I am trying to add a class/id with a number each time a generate a new div
element. Using jQuery UI dialog to add title + content for my block
Eg: add element function {
if there is no div = <div id="block0">
else = count blocks = <div id="block[i]">
Tried with
$('#' + div).prepend(function (i) {
i = 'block' + (i + 1);
}
but is adding same number each time.