javascript - Jquery changing ID of cloned element children not working -
i trying clone element , change id of 1 of children:
var s = $('.runwell').clone().wrap('<div>').parent().html(); s.find('#tag' + runnum).attr('id', 'tag'+ (++runnum)); but not working, doing wrong ?? how change id of child of cloned element ?
you don't have go html..just use cloned jquery object.
try this
var s = $('.runwell').clone().wrap('<div>'); s.find('#tag' + runnum).attr('id', 'tag'+ (++runnum));
Comments
Post a Comment