skip to Main Content

Woocommerce – Round a number to 2 decimal places JS

I have oninput=" price_<?php echo esc_attr( $range_slider_id ); ?>.value=parseFloat(<?php echo esc_attr( $range_price_id ); ?>)*parseFloat(<?php echo esc_attr( $range_slider_id ); ?>.value); " how to round price_~.value two decimal places? I have on output: <output id="price_range_5e5851cd67084" for="range_5e5851cd67084">43.199999999999996</output> I have tried to add .toFixed(2)…

VIEW QUESTION

Console error "Uncaught ReferenceError: $ is not defined" – Jquery ajax

Here is my script code: <script src="//code.jquery.com/jquery.js" defer></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js" defer></script> <script src="//cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js" defer></script> I try to create an ajax function, but it show some error in console : Uncaught ReferenceError: $ is not defined How can I proceed?

VIEW QUESTION
Back To Top
Search