This support forum belongs to the Accordion Gallery Module.
Accordion has a bug tracker here: http://github.com/ipeychev/yui3-gallery/issues
| Page 1 of 1 | [ 5 posts ] |
|
Hey,
First off, thanks for creating accordion. It's a very nice tool. I was wondering if there's an easy way to prevent an accordionItem from expanding after it has been clicked. I only want a couple of them to be open at once. I.E.: Code: accordionItem.on('expandedChange', function(e) { if (!accordionItem.get('expanded')) { if (expandedItems < 2) { expandedItems++; } else { e.preventDefault(); return false; } } }); This doesn't seem to work though, for whatever reason. I've tried to stop the event's propagation as well, which also fails to work. Is there a way to do this? Thanks, Chris |
|
Chris,
chrisb wrote: I was wondering if there's an easy way to prevent an accordionItem from expanding after it has been clicked. I only want a couple of them to be open at once. This is currently not supported. I can add a new event, something like 'itemChosen'. You will be able to cancel the action, which follows - expanding, collapsing, set as always visible or closing an item. OK? Iliyan |
|
That would be awesome. Thanks a lot, Iliyan. And thanks for your speedy response too.
Chris |
|
Committed to GitHub. Basicly, you may prevent an user action in this way:
Code: accordion.on('itemChosen', function(event){ event.preventDefault(); }); event param contains information about the item and whether user clicked on 'set as always visible' icon or 'close' icon. Once they publish that version to Yahoo! CDN, I will update the documentation. Iliyan |
|
Sweet! That was quick.
Thank you! Chris |
| Page 1 of 1 | [ 5 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group