I want to set new id to div using its old Id?
$("#oldId").attr("id","newId");
Its not working.
I want to set new id to div using its old Id?
$("#oldId").attr("id","newId");
Its not working.
Take a look at this question. Can I change the ID of an HTML element using Javascript? Make sure you re-execute your jquery function after the change. Maybe you're working on a 'cached' javascript-object, not the DOM object.