javascript toggle table rows and group elements -


i have table this: http://jsfiddle.net/uow54mex/1/ simple table like

<table> <thead> <tr><th>....</...></thead> <tr><td>.... </table> 

i want automatically group table rows name, in left column should every user once. if visitor clicks on user, row should expand , entries of user 1 should visible.

i have no idea how work javascript, i'll take advice. if important: table shown within php page , dynamically filled sql query.

thanks help!

you can use jquery.datatable plugin row grouping add-on :

$(document).ready(function () {     $('#example').datatable({         "blengthchange": false,         "bpaginate": false,         "bjqueryui": true     }).rowgrouping({         bexpandablegrouping: true,         bexpandsinglegroup: false,         iexpandgroupoffset: -1,         asexpandedgroups: [""]     }); }); 

documentations of 2 projects complete.

jsfiddle


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -