Moo.fx accordion within shadowbox

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Moo.fx accordion within shadowbox

gonzorob
Hi folks

I’m trying to use shadowbox to load a hidden div within my page which has a moo tools accordion on it. The accordion runs fine when loaded directly in the page (not hidden) however it breaks when I load it within a shadowbox..

Any suggestions on how to get this to work?  (aside from loading an external HTML file!)

Thanks

Robin
Reply | Threaded
Open this post in threaded view
|

Re: Moo.fx accordion within shadowbox

Wizzud
Try using the onFinish callback to initialise the accordion on the html once it has loaded into shadowbox.

Shadowbox does a simple clone of the contents of the target inline element, excluding ids. If you have any events attached to the target contents they will not be cloned. If you rely on ids within the target content, the cloned content will not have those ids (because they remain with the original target code). I you have run javascript on the target code prior to cloning it into shadowbox, the liklihood is that you will have to find some way of re-running that script on the newly cloned code.
Combine literacy with curiosity and a whole world of information opens up to you