Can't get / set collapsible property 'collapsed'
Hello,
according to docs this should tell me if a collapsible is collapsed:
var collapsed = $("#MyCollapsible").collapsible("option", "collapsed")
but I always get the value of the data-collapsed attribute set in the original HTML, not the current state.
And this should set the state:
$("#
MyCollapsible
").collapsible("option", "collapsed", true) // or false
but has no effects.
Instead I'm doing this way, and it works:
var collapsed = $("#
MyCollapsible
").hasClass("ui-collapsible-collapsed")
$("#
MyCollapsible
").trigger(
collapsed
? "collapse" : "expand")
Is this a bug of version 1.3.1 or am I doing something wrong?