in my bind "click" event, i would like to chop the last character off a given string incrementally. however, each time i click it, it seems to stop after the first chomp.
var somestring = "mary had a little lamb";
$("#removelaststring").unbind("click").bind("click",function(e){
alert(somestring.slice(0,-1))
});
it should return "one less character" each time it's clicked