I have a called spn1, which has some style from inline + CSS file.
spn1
I have another called spn2
spn2
Try this:
$("#spn2").attr("style", $("#spn1").attr("style")) .addClass($("#spn1").attr("class"));