PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 6.2
Jetpack – WP Security, Backup, Speed, & Growth v6.2
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / _inc / jetpack-admin.js

jetpack-admin.js in Jetpack – WP Security, Backup, Speed, & Growth 6.2, at _inc/jetpack-admin.js

59 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function($) {
2
3 ///////////////////////////////////////
4 // INIT
5 ///////////////////////////////////////
6
7 $(document).ready(function () {
8 initEvents();
9 configFixedElements();
10 });
11
12 ///////////////////////////////////////
13 // FUNCTIONS
14 ///////////////////////////////////////
15
16 function configFixedElements() {
17 var jpTopFrame = $('.frame.top'),
18 jpBottomFrame = $('.frame.bottom'),
19 $body = $('body');
20
21 $body.scroll(function(){
22 if ( 33 > jpTopFrame.offset().top ) {
23 jpTopFrame.addClass('fixed');
24 $body.addClass('jp-frame-top-fixed');
25 }
26 if ( 120 <= jpBottomFrame.offset().top ) {
27 jpTopFrame.removeClass('fixed');
28 $body.removeClass('jp-frame-top-fixed');
29 }
30 });
31
32 $( 'table.jetpack-modules', jpBottomFrame ).addClass( 'with-transparency' );
33 $( '.manage-left', jpBottomFrame ).css( 'width', '' );
34 $( '.manage-right', jpBottomFrame ).show();
35 }
36
37 function initEvents() {
38 // toggle search and filters at mobile resolution
39 $('.filter-search').on('click', function () {
40 $(this).toggleClass('active');
41 $('.manage-right').toggleClass('show');
42 $('.shade').toggle();
43 });
44
45 // Toggle all checkboxes
46 $('.checkall').on('click', function () {
47 $('.table-bordered').find(':checkbox').prop('checked', this.checked);
48 });
49
50 // Clicking outside modal, or close X closes modal
51 $('.shade, .modal .close').on('click', function ( event ) {
52 $('.shade, .modal').hide();
53 $('.manage-right').removeClass('show');
54 event.preventDefault();
55 });
56 }
57
58 })(jQuery);
59