jquery how to select all the class elements start with “text-”?

后端 未结 6 698
夕颜
夕颜 2020-11-30 02:18

I have got some classes

.text-1
.text-2
.text-3

I want to select them all, how to do that? Thanks for the help

6条回答
  •  春和景丽
    2020-11-30 02:43

    $('#qvDetails,#qvAdd,.qvFramedActive,#qvMoreSizes').live('mouseover',function(){
    
            $(this).addClass('qvHover');                                                                            
    
        });
    

    example from one of my projects.you can mention both divs and classes together like above

    you can provide as coma separated class or divs in the same...

提交回复
热议问题