| 1 |
jQuery(function($) { |
| 2 |
$(function() { |
| 3 |
|
| 4 |
/* For Input Switch */ |
| 5 |
$( '.shm-input-switch' ).on( 'click', function() { |
| 6 |
|
| 7 |
var main_control = $( this ); |
| 8 |
|
| 9 |
var attribute = $( this ).is( ':checked' ); |
| 10 |
|
| 11 |
if ( true == attribute ) { |
| 12 |
main_control.parent().parent().addClass( 'active' ); |
| 13 |
main_control.parent().parent().removeClass( 'inactive' ); |
| 14 |
} else if( false == attribute ) { |
| 15 |
main_control.parent().parent().addClass( 'inactive' ); |
| 16 |
main_control.parent().parent().removeClass( 'active' ); |
| 17 |
} |
| 18 |
|
| 19 |
}); |
| 20 |
/* For Input Switch End */ |
| 21 |
}); |
| 22 |
|
| 23 |
// Tabs |
| 24 |
$('.catchp_widget_settings .nav-tab-wrapper a').on('click', function(e){ |
| 25 |
e.preventDefault(); |
| 26 |
|
| 27 |
if( !$(this).hasClass('ui-state-active') ) { |
| 28 |
$('.nav-tab').removeClass('nav-tab-active'); |
| 29 |
$('.wpcatchtab').removeClass('active').fadeOut(0); |
| 30 |
|
| 31 |
$(this).addClass('nav-tab-active'); |
| 32 |
|
| 33 |
var anchorAttr = $(this).attr('href'); |
| 34 |
|
| 35 |
$(anchorAttr).addClass('active').fadeOut(0).fadeIn(500); |
| 36 |
} |
| 37 |
|
| 38 |
}); |
| 39 |
|
| 40 |
// jQuery Match Height init for sidebar spots |
| 41 |
$(document).ready(function() { |
| 42 |
$('.catchp-sidebar-spot .sidebar-spot-inner, .col-2 .catchp-lists li, .col-3 .catchp-lists li').matchHeight(); |
| 43 |
}); |
| 44 |
// jQuery UI Tooltip initializaion |
| 45 |
$(document).ready(function() { |
| 46 |
$('.tooltip').tooltip(); |
| 47 |
}); |
| 48 |
|
| 49 |
}); |