开发者

struts jQuery accordion: disallow user traversal

开发者 https://www.devze.com 2023-03-08 03:44 出处:网络
I\'m using the accordion in the struts jQuery plugin that has 3 accordion items inside.Each of the accordion items has a button at the bottom, which runs a variation of this code: $(\"#accordion\").ac

I'm using the accordion in the struts jQuery plugin that has 3 accordion items inside. Each of the accordion items has a button at the bottom, which runs a variation of this code: $("#accordion").accordion('activate', 1);. I'm trying to come up with a way to either disable the accordion items so that accordion items only open 开发者_高级运维by way of the activate code, or even somehow disallow the ability to open the accordion items by way of the click event on that item.

I've been researching this all morning, and have found that it seems to only be possible to disable the entire accordion (not just specific items), and the event option $( ".selector" ).accordion( "option", "event", 'mouseover' ); also is not working at all for me, although i seem to be able to change other options.

is there a better way to go about doing this??

Thank you in advance for any help you can provide


I ended up disabling the click event for the accordion items.
$("#accordion li h3.ui-accordion-header").unbind("click");

0

精彩评论

暂无评论...
验证码 换一张
取 消