It should be pretty simple. I am trying to use the slice method to delete the last two characters in a dynamically created line in a shopping cart.
So, instead of showing the product as $ 28.00, I want the product to show as $ 28. Since these values ββcome from the database, I cannot just define a string in a variable, as I saw in many tutorials.
I created a JSFiddle here: http://jsfiddle.net/EbckS/
JQuery, which does not work, is below:
$(".myclass").slice(0,-2);
source share