Zub Foundation and events on downloadable ajax content

I was wondering if it is possible to reinitialize the foundation after the content has been modified using ajax.

In my case, I am trying to reinitialize the funds, adhering to form validation on the form that comes back from the ajax call.

I tried just calling $(document).foundation() which should update all javascript ...

+4
source share
2 answers

nice, I found out how to reinitialize validation in my form

just call

$(document).foundation('abide','events');

+7
source

While this seems to work in Foundation 5, there is an updated way to do it correctly in Foundation 5:

 $('#yourFormID').foundation({bindings:'events'}); 
0
source

Source: https://habr.com/ru/post/1498668/


All Articles