Closed HughxDev closed 12 years ago
There is no such signature as .details('close')
in this plugin, so that wouldn’t work.
You want to do this: https://github.com/mathiasbynens/jquery-details/blob/541097e13a251c4d652010fd3842c75886eae980/jquery.details.js#L34-46
Note that Chrome uses a native <details>
implementation, so just triggering the close.details
handler is not enough — you need to call .prop('open', false)
.
OK, thank you. Figured there would be a single method of invoking regardless of whether the behavior was native or polyfilled—obviously, this solution is simple enough, but I’d like to propose that feature, as a compliment to toggleOpen.
Trying to close all other details elements when one is opened, "accordion-style". Have tried this in Chrome:
as well as the same with
.trigger('close.details')
andtriggerHandler('close.details')
. Is this a bug or am I doing something wrong?