Using a class name in jQuery's .closest()

后端 未结 4 496
长情又很酷
长情又很酷 2020-12-25 12:16

I\'m attempting to do some calculations for a \"running total\", this is my code:

$(\'.quantity_input\').live(\'change\',function(){         
                       


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-25 12:57

    You need to find the .cost_of_items in the containing this:

    $(this).closest('tr').find('.cost_of_items')
    

提交回复
热议问题