1(function ( $ ) { 2 'use strict'; 3 4 $( document ).ready( function () { 5 $( 'body' ).on( 'adding_to_cart', function ( event, $button, data ) { 6 if ( $button && $button.hasClass( 'vc_gitem-link' ) ) { 7 $button 8 .addClass( 'vc-gitem-add-to-cart-loading-btn' ) 9 .parents( '.vc_grid-item-mini' ) 10 .addClass( 'vc-woocommerce-add-to-cart-loading' ) 11 .append( $( '<div class="vc_wc-load-add-to-loader-wrapper"><div class="vc_wc-load-add-to-loader"></div></div>' ) ); 12 } 13 } ).on( 'added_to_cart', function ( event, fragments, cart_hash, $button ) { 14 if ( 'undefined' === typeof ($button) ) { 15 $button = $( '.vc-gitem-add-to-cart-loading-btn' ); 16 } 17 if ( $button && $button.hasClass( 'vc_gitem-link' ) ) { 18 $button 19 .removeClass( 'vc-gitem-add-to-cart-loading-btn' ) 20 .parents( '.vc_grid-item-mini' ) 21 .removeClass( 'vc-woocommerce-add-to-cart-loading' ) 22 .find( '.vc_wc-load-add-to-loader-wrapper' ).remove(); 23 } 24 } ); 25 } ); 26})( window.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.