catch-scroll-progress-bar-admin.js
6 years ago
jquery-matchHeight.min.js
6 years ago
our-themes.js
6 years ago
wp-color-picker.js
6 years ago
catch-scroll-progress-bar-admin.js
57 lines
| 1 | jQuery(function($) { |
| 2 | /* CPT switch */ |
| 3 | $( '.ctp-switch' ).on( 'click', function() { |
| 4 | var loader = $( this ).parent().next(); |
| 5 | |
| 6 | loader.show(); |
| 7 | |
| 8 | var main_control = $( this ); |
| 9 | var data = { |
| 10 | 'action' : 'ctp_switch', |
| 11 | 'value' : this.checked, |
| 12 | 'option_name' : main_control.attr( 'rel' ) |
| 13 | }; |
| 14 | |
| 15 | $.post( ajaxurl, data, function( response ) { |
| 16 | response = $.trim( response ); |
| 17 | |
| 18 | if ( '1' == response ) { |
| 19 | main_control.parent().parent().addClass( 'active' ); |
| 20 | main_control.parent().parent().removeClass( 'inactive' ); |
| 21 | } else if( '0' == response ) { |
| 22 | main_control.parent().parent().addClass( 'inactive' ); |
| 23 | main_control.parent().parent().removeClass( 'active' ); |
| 24 | } else { |
| 25 | alert( response ); |
| 26 | } |
| 27 | loader.hide(); |
| 28 | }); |
| 29 | }); |
| 30 | /* CPT switch End */ |
| 31 | |
| 32 | // Tabs |
| 33 | $('.catchp_widget_settings .nav-tab-wrapper a').on('click', function(e){ |
| 34 | e.preventDefault(); |
| 35 | if( !$(this).hasClass('ui-state-active') ){ |
| 36 | $('.nav-tab').removeClass('nav-tab-active'); |
| 37 | $('.wpcatchtab').removeClass('active').fadeOut(0); |
| 38 | |
| 39 | $(this).addClass('nav-tab-active'); |
| 40 | |
| 41 | var anchorAttr = $(this).attr('href'); |
| 42 | |
| 43 | $(anchorAttr).addClass('active').fadeOut(0).fadeIn(500); |
| 44 | } |
| 45 | |
| 46 | }); |
| 47 | |
| 48 | // jQuery Match Height init for sidebar spots |
| 49 | $(document).ready(function() { |
| 50 | $('.catchp-sidebar-spot .sidebar-spot-inner, .col-2 .catchp-lists li, .col-3 .catchp-lists li').matchHeight(); |
| 51 | }); |
| 52 | // jQuery UI Tooltip initializaion |
| 53 | $(document).ready(function() { |
| 54 | $('.tooltip').tooltip(); |
| 55 | }); |
| 56 | |
| 57 | }); |