| 1 |
(function($){ |
| 2 |
$(document).ready(function(){ |
| 3 |
|
| 4 |
$(document).on('click', '.srr_tab_list a', function(e){ |
| 5 |
e.preventDefault(); |
| 6 |
var $settings = $(this).closest('.srr_settings'); |
| 7 |
var id = $(this).data('tab'); |
| 8 |
$settings.find('.active').removeClass('active'); |
| 9 |
$(this).addClass('active'); |
| 10 |
$settings.find('section[data-tab-id="' + id + '"]').addClass('active'); |
| 11 |
}); |
| 12 |
|
| 13 |
$(document).on('mouseenter', '.srr_pro_intro', function(){ |
| 14 |
if( !$(this).hasClass('srr_pro_expand') ){ |
| 15 |
window.srr_pro_expand = window.setTimeout(function($ele) { |
| 16 |
window.srr_pro_expand = null; |
| 17 |
$ele.closest('.srr_pro').find('.srr_pro_details').slideDown(); |
| 18 |
$ele.addClass('srr_pro_expand'); |
| 19 |
}, 1500, $(this)); |
| 20 |
} |
| 21 |
}); |
| 22 |
|
| 23 |
$(document).on('mouseleave', '.srr_pro_intro', function(){ |
| 24 |
clearTimeout(window.srr_pro_expand); |
| 25 |
}); |
| 26 |
|
| 27 |
$(document).on('click', '.srr_pro_intro', function() { |
| 28 |
var $details = $(this).closest('.srr_pro').find('.srr_pro_details'); |
| 29 |
if( !$(this).hasClass('srr_pro_expand') ){ |
| 30 |
$details.slideDown(); |
| 31 |
$(this).addClass('srr_pro_expand'); |
| 32 |
}else{ |
| 33 |
$details.slideUp(); |
| 34 |
$(this).removeClass('srr_pro_expand'); |
| 35 |
} |
| 36 |
}); |
| 37 |
|
| 38 |
}); |
| 39 |
}(jQuery)) |