how to call jQuery(this) from anchor tag onclick function

后端 未结 5 1873
礼貌的吻别
礼貌的吻别 2020-12-17 23:31

I have

 
  • New Test
  • &
5条回答
  •  情书的邮戳
    2020-12-17 23:55

    One line:

    jQuery(this).closest('li').addClass("selected").siblings().removeClass("selected");
    

    but you will have to amend your event to pass through 'this';

    onclick="setSelectedTestPlan(this);"
    

提交回复
热议问题