alfajango / jquery-dynatable

A more-fun, semantic, alternative to datatables
http://www.dynatable.com
Other
2.77k stars 363 forks source link

How to implement to ready table? #252

Open naskobulgaria opened 8 years ago

naskobulgaria commented 8 years ago

I want to implementit in a way when page load the table, the DYNATABLE must be loaded and all functions in it, not with a button like this fiddle: https://jsfiddle.net/perqa/NqycM/ Now the script executes when this button is preseed: <button onclick="$('#my-table').dynatable();">DYNATABLE</button>

But i want when my table is fetched, the script to be executed automaticaly: I try this code, but not work: <table id='mytable' onload="$('#my-table').dynatable();">

dnsBlah commented 8 years ago

put this at the end of your page: (!!! Before </body> !!!)

<script>
$(document).ready(function() {
   $('#my-table').dynatable();
});
</script>