JQuery 1.4.4 error "q.replace is not a function"

I made a script that automatically calculates the total price for the invoice. Because I want to display the price with a semicolon instead of a period. I put .replace('.',',');javascript in the float value.

But now I get jQuery error. Exact error:

Error: q.replace is not a function

Source: http: //**.nl/cms/pub/jquery/jquery-1.4.4.min.js

Line: 101

And I use the replace function as below:

Someone puts a price in the HTML text box, and I request this value with the following code:

var price = $(this).find('.product_price').find('input').val().replace(',', '.');

This line works, but I get this strange jQuery error.

I hope someone can help me! Thank!!

+3
source share
1 answer

val , undefined. undefined, replace.

, find('.product_price').find('input') ; val undefined.

+2

Source: https://habr.com/ru/post/1788690/


All Articles