I am getting a Uncaught Syntax Error: Unexpected Identifier in the Chrome Console Window. The lines are below, I have just posted a snippet of the function, the entire function can be found on jsFiddle.
var shipping_price = $(".shipping_price").html();
shipping_price = shipping_price.substring(1, shipping_price.length);
$('input[name="shipping_price"]').val(shipping_price); // Update our Hidden Field
// Unexpected Identifier
result += eval(shipping_price); // This is where Im getting the error
I have to use eval otherwise the function does not work. I am also getting an error when I call the above function:
// Call getTotalPrice(); On DOM Ready
// dom ready
getTotalPrice(); // Anonymous function error, I think this is fixed when I fix the above error.
Any ideas how I can fix these easily?
try this
also, Anonymous function error means that the function does not exist, check capitalization and spelling