tommcfarlin/Collapsible-Menus

UL needs id attribute

Closed this issue · 1 comments

I was using this plugin on a group of nested lists that had a class but no id. I expected something like this to work

jQuery('.categories').collapsible();

but it didn't work until I added an ID to the UL. I am still passing the class name, but that only works if you have an ID attribute on the UL.

Yes - this is by design. The main reason is because users may want to have more than one collapsible menu on a page, so the plugin forces an ID to be specified so unexpected problems don't occur when using class names.

That said, I have updated the plugin to now throw an exception based on this ticket so thanks for providing it!