I have a DIV with some characters. How can I remove the last character from the text with each click on the DIV itself?
DIV
To supplemnt on Jonathons answer, use..
$("div.myDiv").click(function(){ $(this).html( $(this).text().replace("/.$/gi", "o") ); });
To remove the last character