Clone style in jQuery?

后端 未结 9 1586
轻奢々
轻奢々 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:41

    jQuery doesn't have any direct facilities for doing this. You will have to use plain old JavaScript to find a cross-browser way to copy over the computed style of one element to another. This answer has an implementation for a potential solution.

提交回复
热议问题