You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No callback function to reinitialize the plugin if loaded in via ajax (e.g. barba.js) causes the page to reload on submission, please add or advise how this can be achieved. Cheers!
The text was updated successfully, but these errors were encountered:
Not quite - I have the plugin installed and working correctly if the user performs the initial load on the page where the form is embedded. However, if a user loads the site from a page that does not contain the form and then navigates to a page that does, the form will trigger a refresh on submission, i've attempted to reload the scripts on page enter from barba but it doesn't get it working correctly. So I was looking for some sort of initialize function to call.
Here's the example site (scroll down towards the footer and you will see a newsletter section)
I see what you're saying. The two scripts our plugin provides are not loading when using barba to transition to a page containing the form.
The easy solution would be to inject the two script tags on pages that contain the form. You should probably also check to make sure that window.Yikes_Mailchimp_Ajax isn't already defined.
I'd probably drop a function in my js bundle that manages adding the scripts and just trigger it after checking the window.location.pathname against a predefined list.
No callback function to reinitialize the plugin if loaded in via ajax (e.g. barba.js) causes the page to reload on submission, please add or advise how this can be achieved. Cheers!
The text was updated successfully, but these errors were encountered: