| Page 1 of 1 | [ 5 posts ] |
|
Hey guys,
Do any of you know of a way to disable the expansion/collapsing of nodes when the label of a node is clicked? I'd still like to be able to perform other actions, such as a postback or something, but doing this is a little annoying when the nodes are being expanded/collapsed every time they are clicked. I'd still like to maintain the expand/collapse functionality by clicking on the + icons to the side, however. Is this even possible? I've tried returning false when the expand/collapse actions are triggered, amongst other things, but this seems to cancel the post-back and prevents the + icons from working. Cheers! |
|
Listen to the click event and return false.
See: http://developer.yahoo.com/yui/docs/YAH ... clickEvent |
|
My understanding of returning false is that it will cancel everything -- I still want to do other things after I click on the node; I just don't want to expand or collapse it when this happens.
When I add a new listener to that action, and make it return false, this makes NOTHING happen when I click the node. I don't want that. Is that correct, or am I just understanding (and implementing..?) this incorrectly? Thanks! |
|
There is nothing that prevents you from adding code to do any number of things within the same listener beyond returning false.
That is the whole idea of the click event, to use it for whatever you want done and, finally, return false to prevent the default action which is to toggle. |
|
Ah, okay, that makes sense!
I managed to get the desired effect now, thanks! |
| 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