Menu icon Foundation

My Posts


My Comments

Jason Locashio commented on Allen Petersen's post over 5 years

This is kindof late, I know, but there is an easier way to handle this. Foundation apparently doesn't bind with the jQuery .on method, but binds internally on init of the plug-in (in this case, Reveal). However, this situation was accounted for and bindings can be "refreshed" with this line of code (for Foundation 5):

 $(document).foundation({bindings: 'events'});

That should re-init all event bindings across all of Foundation on that page. I usually add it as the last line of my dynamic insert script, after the DOM is modified.

I hope that helps.

Posts Followed


Following

    No Content

Followers

My Posts

My Comments

You commented on Allen Petersen's post over 5 years

This is kindof late, I know, but there is an easier way to handle this. Foundation apparently doesn't bind with the jQuery .on method, but binds internally on init of the plug-in (in this case, Reveal). However, this situation was accounted for and bindings can be "refreshed" with this line of code (for Foundation 5):

 $(document).foundation({bindings: 'events'});

That should re-init all event bindings across all of Foundation on that page. I usually add it as the last line of my dynamic insert script, after the DOM is modified.

I hope that helps.

Posts Followed

Following

  • No Content

Followers

  • No Content