jquery if div not id

后端 未结 5 728
孤城傲影
孤城傲影 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:50

    Try using

    if($('div').not('#sale_wrap'))
    {
      t_balance;
    } 
    else
    {
      var sale = t_balance*((100-window.discount_p)/100);
      t_balance = sale;
    }
    

提交回复
热议问题