Accordion does not work if loaded after page completion via AJAX/XHR #12624
-
Hello, I started using Foundation 2 months ago and I'm still excited how flexible and versatile it is. Now I have the first issue I can't resolve myself: I have two accordions on a page - one accordion that is shown directly when the page is loaded and one that is shown after the user clicks on a link by loading it into a DIV with Ajax/XHR. The first one works fine, the second one doesn't work at all... My example page: https://www.golfhelfer.de/dgl-neu/test_akkordeon.cfm I suppose this comes from loading the second accordion after the foundation.js has been loaded and the call to foundation() has been made - but how can I make it work? Thanks in advance for any hint! Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You need to initialize manually the
|
Beta Was this translation helpful? Give feedback.
You need to initialize manually the
#accordion-test
after the AJAX call.new Foundation.Accordion($('#accordion-test'));
More info