One more time I'm very sorry for my English :)
But I like jQuery very much :)

How I can add ID like I add class by function addClass?

For example i have:

<div>Some text #1</div>
<div>Some text #2</div>

And i want see this result:
<div id="Div1">Some text #1</div>
<div id="Div2">Some text #2</div>

I don't know how make this, please help.
Maybe like this :):

$(document).ready(function() {
   var i = 1;
   $("div").each(function(){
       this.addID("Div"+ "1");
   });
});

Reply via email to