Clone style in jQuery?

后端 未结 9 1587
轻奢々
轻奢々 2021-02-05 03:56

I have a called spn1, which has some style from inline + CSS file.

I have another called spn2

9条回答
  •  死守一世寂寞
    2021-02-05 04:21

    Is there a reason you're not simply doing .clone(true)?

    http://jsfiddle.net/johncmolyneux/6Fz84/

    This example copies inline and class styles, but not id styles (which could be very useful).

提交回复
热议问题