GrassHopperPebbles.com Demos

JQuery Plugins

imList 1.0 - Table Option

The following example shows how to use the imList plugin with the display.type set to "table". I am using the 'stripe_class' option to alternate the color of each row. I am also using the 'doDeleteRow' function (a table function option) that, as the name suggests, enables a user to delete a row from a database as well as the table row itself. Whenever you use the 'doDeleteRow' option, you should return the result:

{"type": "message", "label": "Record Deleted"}

In order to create the table, the data returned from the server should be Json object. The example table below uses following data:

[{"member_id": "1", "first_name": "Jack", "last_name": "O\'neal", "address": "225 Cheyenne Mountain", "city": "Colorado Springs", "state_abbrev": "CO"}, {"member_id": "2", "first_name": "Samantha", "last_name": "Carter", "address": "226 Cheyenne Mountain", "city": "Colorado Springs", "state_abbrev": "CO"}, {"member_id": "3", "first_name": "Daniel", "last_name": "Jackson", "address": "227 Cheyenne Mountain", "city": "Colorado Springs", "state_abbrev": "CO"}, {"member_id": "4", "first_name": "Teal\'c", "last_name": "of Chulak", "address": "228 Cheyenne Mountain", "city": "Colorado Springs", "state_abbrev": "CO"}, {"member_id": "5", "first_name": "General", "last_name": "Hammond", "address": "229 Cheyenne Mountain", "city": "Colorado Springs", "state_abbrev": "CO"}]

View the source code for this page to view how to use the plugin. For documentation about the imList plugin, view the blog post. Does Teal'c have a last name? Can someone research this?

Tags

, , , , ,