I have a called spn1, which has some style from inline + CSS file.
spn1
I have another called spn2
spn2
UPDATE
Check this fiddle: http://jsfiddle.net/9BJ5y/
Better idea would be clone spn1 and replace spn2 with it.
i.e. something like:
var x = $('#spn2').html(); $('#spn2').replaceWith($('#spn1').clone().html(x).attr('id', 'spn2'));