jquery if div not id

后端 未结 5 704
孤城傲影
孤城傲影 2021-01-01 11:17

I want to cut the price off to all input value in all divs, except only one div sale_wrap. how do I make an exception with jquery?

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-01 11:38

    Just to add little more information. One can use multiple not selector like this:

    $("div:not(#sale_wrap):not(.sale_class)");
    

    or

    $("div:not(#sale_wrap, .sale_class)");
    

    or

    $("div").not('#sale_wrap, .sale_class');
    

提交回复
热议问题