1jQuery( document ).ready( function( $ ){ 2 3 $( '.mx-calc-user-enter' ).each( function() { 4 5 $( this ).on( 'change', function() { 6 7 var price = parseFloat( $( this ).attr( 'data-calc-item-price' ) ); 8 9 var _val = $( this ).val(); 10 11 var amount = parseFloat( price * _val ).toFixed( 2 ); 12 13 $( this ).parent().find( '.mx-calc-price-result' ).text( amount ); 14 15 } ); 16 17 } ); 18 19 $( '.mxCalcCount' ).on( 'click', function( e ) { 20 21 e.preventDefault(); 22 23 var calc_wrapper = $( this ).parent().parent(); 24 25 var _amount = 0; 26 27 $( calc_wrapper ).find( '.mx-calc-price-result' ).each( function() { 28 29 _amount = _amount + parseFloat( $( this ).text() ); 30 31 } ).promise().done( function() { 32 33 var sum = parseFloat( _amount ).toFixed( 2 ); 34 35 $( calc_wrapper ).find( '.mxCalcShowAmonut' ).text( sum ); 36 37 } ); 38 39 } ); 40 41} );
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.