0

I have this table which I implement the Jquery-DataTables

and in that I have a Select All function that works well;

<thead>
  <tr>
    <th>
      <label>
        <input type="checkbox" > All
      </label>
    </th>
  </tr>
</thead>

the problem is when I clicked the checkbox the sort event of table is also being performed. what I want is, when I click on the Text "All" or the Checkbox the sort event will not perform, instead, it will only perform as usual if the table header(outside the Text or Checkbox) and the Sort-Icon is clicked.

any idea how to do it?

1 Answer 1

1

I have solved this issue by running this script (from this) after initialization of Jquery-Datable to my table;

$('input').click(function (event) {
    event.stopPropagation();
});

hope it will help someone someday.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.