I have few elements with class reveal
and elements to toggle them. Thing is, some of these are added from ajax response. Naturally, these added from ajax response do not work. From some googling, I found out that you need to initialize foundation again, so I do $(document).foundation();
. Beautiful, reveal now works for newly added elements but it behaves weirdly for old ones (you need to click twice for it to work now). So I assume, for it to work properly, I'd need to uninitialize foundation or at least reveal before initializing it again. Thing is, no matter what I try, it won't do it. So question is - how to properly uninitialize foundation or at least reveal?
Reinitialize reveal (Foundation 6.0.1)
1.2k Views Asked by Igor Yavych At
1
Maybe a little late, but the issue can be very easily solved by reinitializing the reveal part of foundation by typing:
Foundation.reInit('accordion');
, this works for me at least. enter link description here