jQuery .toggle() button only toggles every other element -
my code generates different elements on click of 1 button. 1 of elements generated buttons want toggle on , off parts of text generated. jquery .toggle() function works first element generated. works latest element generated , every other 1 before (say, 5 elements generated, work on 5, 3, 1 not 2 , 4). seems issue class, think, because can, web console in firefox use .toggle() command manually remove it. guess mean button not triggering. @ loss. here jsfiddle showing behaviour http://jsfiddle.net/jalbr/1/ here code: recursioncounter = 0 $(document).ready(function(){ $("#compute").click(function(){ //add toggle data $("#buttons").append("<input type=button value=\"toggle\" class=\"removebtn\" id=\"recursion" + recursioncounter + "\">") //add recursion counter div element $("#recursion" + recursioncounter).data("recurs", recursioncounter) //make new section togg...