1jQuery( document ).ready(function() { 2 "use strict"; 3 4 var $window = jQuery( window ), 5 $document = jQuery( document ), 6 $body = jQuery( 'body' ); 7 8 // Init elements 9 //------------------------------------------ 10 11 $document.on( 'action.init_hidden_elements', function(e, cont) { 12 13 // Featured image as panel 14 jQuery('.sc_services_qw-panel .sc_services_item:not(.switch_qw_panel_inited)').addClass('switch_qw_panel_inited').each(function() { 15 var $self = jQuery(this); 16 var $text = $self.find('.sc_services_item_text'); 17 $self.on('mouseenter', function() { 18 var num = $self.data('item-number'), 19 $posts = $self.parents('.sc_item_posts_container'), 20 $old_panel = $posts.find('.sc_qw_panel_thumb_active').removeClass('sc_qw_panel_thumb_active'), 21 $new_panel = $posts.find('.sc_qw_panel_thumb[data-thumb-number="' + num + '"]').addClass('sc_qw_panel_thumb_active'); 22 $document.trigger( 'action.init_hidden_elements', [$new_panel] ); 23 }); 24 25 function assign_hover($self, $text) { 26 $self 27 .off('.qw-panel') 28 .on('mouseenter.qw-panel', function() { 29 if ($text.css('display') == 'none') { 30 $text.stop().slideDown(300); 31 } 32 }) 33 .on('mouseleave.qw-panel', function() { 34 $text.stop().slideUp(300); 35 }); 36 } 37 var reassign_hover = trx_addons_throttle(function() { 38 assign_hover($self, $text); 39 }, 1100); 40 assign_hover($self, $text); 41 $document.on( 'action.resize_trx_addons', function() { 42 reassign_hover($self, $text); 43 }); 44 }); 45 46 47 // Masonry for testimonials Date 48 cont.find( '.sc_testimonials_masonry_wrap').each( function() { 49 var testimonials = jQuery(this); 50 if ( testimonials.parents( 'div:hidden,article:hidden' ).length > 0 ) return; 51 if ( ! testimonials.hasClass( 'inited' ) ) { 52 trx_addons_when_images_loaded( testimonials, function() { 53 setTimeout( function() { 54 testimonials.masonry( { 55 itemSelector: '.sc_testimonials_masonry_item', 56 columnWidth: '.sc_testimonials_masonry_item', 57 percentPosition: true 58 } ); 59 testimonials.addClass( 'inited' ); 60 // Trigger events after masonry layout is finished 61 jQuery( window ).trigger( 'resize' ); 62 jQuery( window ).trigger( 'scroll' ); 63 }, 10 ); 64 }); 65 } else { 66 // Relayout after 67 //setTimeout( function() { testimonials.masonry(); }, 310 ); 68 } 69 }); 70 71 }); 72 73 74 // Change param "slides per" in exactly sliders 75 trx_addons_add_filter( 'trx_addons_filter_slider_init_args', function( $param, $init ) { 76 if( $init.parents('.slider_width_auto').length > 0 ) { 77 $param.slidesPerView = 'auto'; 78 } 79 return $param; 80 }); 81 82 83 // QW Case 84 jQuery('.sc_portfolio_qw-case:not(.qw_case_inited)').addClass('qw_case_inited').each(function() { 85 var items = jQuery(this).find('.sc_portfolio_item'); 86 items.first().addClass('is-active'); 87 items.each( function() { 88 var $item = jQuery(this); 89 $item.off('.qw-case') 90 .on('mouseenter.qw-case', function() { 91 items.removeClass('is-active'); 92 $item.addClass('is-active'); 93 }); 94 }); 95 }); 96 97});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.