I am trying to attach events that would manipulate JQM components, but once I have a reference to the component, I do not know what actions I can apply to it. For example, with the new collapsible listview”, how would I collapse all the items with a button click? Here is the demo of the collapsible listview: http://jquerymobile.com/demos/1.2.0-alpha.1/docs/lists/lists-collapsible.html
Share
For collapsible’s you can utilize the
expandandcollapseevents:For example you can collapse/expand all the collapsible widgets in the DOM based on their current state like this:
Here is a demo: http://jsfiddle.net/HLEss/1/
Here is an example collapsible widget’s HTML to verify that you can select by the “collapsed” class:
I hope that helps.
Update
Here is the documentation for these events (sparse as it is): http://jquerymobile.com/demos/1.1.1/docs/content/content-collapsible-events.html