Clone style in jQuery?

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

    Why not applying whatever rules to both elements at the time?

    Something like:

    $('spn1','spn2').css({color: 'red'});
    

    You could use multiple selectors http://api.jquery.com/multiple-selector/

提交回复
热议问题