How To Increment Div Id Value?
I have got a task to set the menu as selected. For that I use dynamic id. So I want to increment it with respect to the selection My code is
Solution 2:
This is the way to do it with Jquery
valelementList= $(".menu");
for (vari=1; i <= list.length; i++) {
elementList[i].attr("id", "menu" + i);
}
Post a Comment for "How To Increment Div Id Value?"