1/** 2 * alg-wc-pop-frontend.js. 3 * 4 * @version 1.7.0 5 * @since 1.3.1 6 */ 7 8(function($){ 9 10 function alg_wc_pop_force_decimals(e){ 11 var value = parseFloat( e.val() ); 12 if ( isNaN( value ) ) { 13 value = 0; 14 } 15 e.val( value.toFixed( alg_wc_pop_data_object.force_decimal_width ) ); 16 } 17 18 function wpw_pop_product_addons_compatibility( amount ){ 19 if ( $( '#product-addons-total' ).length ) { 20 $( '#product-addons-total' ).data( 'price', amount ); 21 $( '.cart' ).trigger( 'woocommerce-product-addons-update' ); 22 } 23 } 24 25 $( document ).ready( function(){ 26 if ( 27 typeof alg_wc_pop_data_object.force_decimals !== "undefined" 28 && alg_wc_pop_data_object.force_decimals 29 ) { 30 $( '.alg_open_price' ).each( function(){ 31 $( this ).on( 'change', function(){ 32 alg_wc_pop_force_decimals( $( this ) ); 33 }); 34 }); 35 } 36 $( '.alg_open_price' ).first().on( 'change', function(){ 37 wpw_pop_product_addons_compatibility( $( this ).val() ); 38 }); 39 $( '.alg_open_price' ).first().trigger( 'change' ); 40 }); 41 42})( 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.