1(function ($) { 2 'use strict'; 3 4 var init = function(){ 5 // variation form 6 if ( typeof wc_add_to_cart_variation_params !== 'undefined' ) { 7 $( '.variations_form' ).each( function() { 8 $.fn.wc_variation_form && $( this ).wc_variation_form(); 9 }); 10 } 11 12 // tab, rating 13 $( '.wc-tabs-wrapper, .woocommerce-tabs, #rating' ).trigger( 'init' ); 14 15 // category sorting 16 $( '.woocommerce-ordering' ).on( 'change', 'select.orderby', function() { 17 $( this ).closest( 'form' ).submit(); 18 }); 19 20 // zoom and slider 21 22 $( '.woocommerce-product-gallery' ).each( function() { 23 wc_single_product_params.zoom_enabled = 1; 24 wc_single_product_params.flexslider_enabled = 1; 25 $.fn.wc_product_gallery && $( this ).wc_product_gallery( wc_single_product_params ); 26 } ); 27 28 } 29 // ajax success 30 $(document).on('pjax:complete', function() { 31 init(); 32 }); 33 34 init(); 35 36})(jQuery);
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.