Reputation:
After much banging my head against the wall, I found this: http://bugs.jquery.com/ticket/9777 Yay!
My problem is that when I $.clone()
an element in ie7 and try to change all id
s with $myClonedElement.find("*[id]").andSelf().each(function() { $(this).attr("id", $(this).attr("id") + "-" + idNumberVariableForDynamicDatabasePagination); });
, the id
s for the clone also change.
I'm guessing I should use $.html()
instead (if you have a better alternative, please suggest it), and append '-' + idNumberVariableForDynamicDatabasePagination
to each id
.
How can I do this?
Upvotes: 0
Views: 146
Reputation: 95047
Avoid the bug by not using .attr
, according to the bug report you linked to.
this.id = this.id + "-" + somenumber
I don't have a real version of IE7 to test this with.
Upvotes: 1