ASP.Net MultiView & JQuery Accordion

2019-09-03 20:46发布

问题:

I have a jQuery accordion running inside an ASP.Net MultiView.

It works fine if placed on the first view, however when changing to another view with the accordion on it fails to work.

Looking in Firebug the code is all there, the styles etc... even the hover over works. Just no accordion behavior when clicking headings.

What am I doing wrong.

Only thing i can think of is to use the ASP.Net Accordion Ajax control, however that would make me sad.

回答1:

I guess the problem is update panel or ajax request, when you change the step jquery bindings are lost. You can use endRequest event to rebind the accordion.

more details about endRequest http://msdn.microsoft.com/en-us/library/bb383810.aspx