You do stuff like that with a library like jQuery so that you have cross-browser support.
Look at this string of jQuery methods
$("#acs-label") - find ID #acs-label in the DOM - and return it in an array of items (will be just one item in that array since ID's are unique on a page).Code:$("#acs-label").clone().appendTo(strPanel + "-edit .acs-edit-top-tab").removeAttr("id").addClass("acs-edit-label").html("");
.clone() - clone it - make a copy of what was in the DOM - and return it
.appendTo() - append what you just cloned to whatever "strPanel +..." resolves to in the DOM
.removeAttr() - can't have another item with this ID name - better remove it
.addClass() - add some CSS classes
.html() - sets the HTML of this item (label) to "" (blank string)




Reply With Quote
