jQuery If DIV Doesn't Have Class “x”

后端 未结 7 2304
庸人自扰
庸人自扰 2020-11-27 10:54

In jQuery I need to do an if statement to see if $this doesn\'t contain the class \'.selected\'.

$(\".thumbs\").hover(function(){

$(this).stop().fadeTo(\"no         


        
相关标签:
7条回答
  • 2020-11-27 11:24

    I think the author was looking for:

    $(this).not('.selected')
    
    0 讨论(0)
提交回复
热议问题