fixed.
I was working with a cloned element.
I was doing $("#something").clone().appendTo("#someone");
then selecting the freshly cloned element and modifying it.

I learned that it is way better to work with variables.
now my code looks like
var $cloned = $("#something").clone();

$cloned.find("what I need").attr("name", new_name);
...

$cloned.appendTo("#someone");

this works perfectly.
I know it may sound quite noobish, ma I just wanted to share.
And if you have further suggestions on optimization, they would be
more than welcome :)

thanks a lot to everybody
andrea

Reply via email to