javascript - How to create jquery Jtable dynamically -


i have dynamically create jquery jtable based on columns selected user. till have done hardcoding column names , firing ajax data displayed in jtable.

how create dynamically ?

here js sample code.

<script type="text/javascript">  $(document).ready(function () {      $('#studenttablecontainer').jtable({         title: 'the student list',         paging: true, //enable paging         pagesize: 10, //set page size (default: 10)         sorting: true, //enable sorting         defaultsorting: 'name asc', //set default sortin         fields: {             studentid: {                 key: true,                 create: false,                 edit: false,                 list: false             },             name: {                 title: 'name',                 width: '23%'             },             emailaddress: {                 title: 'email address',                 list: false             },            }     }); </script> 

html

<div id="studenttablecontainer"></div> 


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -