您拥有的代码在拨弄中工作得很好。初始页面加载后,按钮是否通过AJAX动态呈现?
用
$(document).on("click", ".remove_weight_button", function(){代替
$(".remove_weight_button").click(function(){
您拥有的代码在拨弄中工作得很好。初始页面加载后,按钮是否通过AJAX动态呈现?
用
$(document).on("click", ".remove_weight_button", function(){代替
$(".remove_weight_button").click(function(){