Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

FoundationPress doesn't seem to be working with ajaxify (AWS plugin) #994

Closed
MarineLB opened this issue May 30, 2017 · 2 comments
Closed

Comments

@MarineLB
Copy link

MarineLB commented May 30, 2017

Hello,
I am trying for the second time to use ajaxify wordpress site on a FoundationPress theme.
Problem is, if there is anything using javascript (for example my menu is using the sticky plugin from Foundation), it's not working after an ajax reload. Which is weird, because the foundation.js file is being reloaded...

Has anyone made this theme work with ajax or is it just me ?

Here is the example of the not working website if it can help anybody : https://lesdeuxvagues.com/demo/

EDIT :
I have found the root of my issue.
Most of the javascript in foundation.js is executed on the document.ready event.
The problem is that with an ajax load, there is no document.ready event.
I have found that there is no way to simulate it.
Would it possible to create a new function, for example onPageLoad(), where all of this code goes, and this one function would be called on document.ready. And us people working with ajax could call this function again on ajaxComplete ?
Would be nice !

@MarineLB
Copy link
Author

MarineLB commented Jun 2, 2017

Someone ? :)

@olefredrik
Copy link
Owner

I don't see this as a bug in FoundationPress, but rather with the integration of a third party plugin. I will therefore close the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants