Set / Copy javascript computed style from one element to another
问题 So I am trieing to copy all the style that apply on one element ( class / id / tagName / attribute etc. ). So far I found out that I can copy the computed style of an element, Just one problem ... couldend apply it on outher element ;/ or diffrend way to copy all the style. (this is as far as i got :/ ) http://jsfiddle.net/8KdJd/2/ //queriks mode + minor changes to retrive the computed style function getCS(el) { if (el.currentStyle) var y = el.currentStyle; else if (window.getComputedStyle)