jquery .on() only works once
I have a table with multiple checkbox inputs:
<form>
<table id="table">
<tr>
<td><input type="checkbox" value="1" class="someClass"></td>
<td><input type="checkbox" value="1" class="someClass"></td>...
And some jquery that refreshes the table from another file when the box is
checked/unchecked:
$(".someClass").on("change", function() {
$('#edit').ajaxSubmit(); //Submitting the form with id "edit"
$("#table").load("tablerefresh");
});
My problem is that when I check/uncheck a box, the table will refresh only
once, and it should do it every time I check/uncheck the box, I've looked
everywhere and can't seem to find a solution. Any ideas?
No comments:
Post a Comment