JQuery Multiple selectors, $(this) reference?

后端 未结 3 726
隐瞒了意图╮
隐瞒了意图╮ 2021-01-18 07:56

given the following

$(\"#identifier div:first, #idetifier2\").fadeOut(300,function() {
  // I need to reference just the \'#identifier div:first\' element
           


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-18 08:12

    Just check about which ID you're currently processing in $(this)

    if(this.id == "identifier"){ //your code goes here }
    

提交回复
热议问题