This is how I am coding:
$(document).ready(function () {
$("[id^=btnToggle]").click(function () {
$('#infoToggle' + this.id.match(/\d+$/)[0]).toggle();
});
$('#dataTables-example').DataTable({
responsive: true
});
});
Here this code $("[id^=btnToggle]")
is not working, but when I remove $('#dataTables-example')
it is working fine.
I tried reversing their positions, I tried using separate document ready function, it did not work.
Please let me know how to fix this?
Thanks