Basic Structure below, have an ajax script that replaces the div inner-content and updates the menu, pushes history states, fade in/out contents ect..
The inner-content contains a foundation grid row and content of wordpress editor lives inside that container.
Now here is the issue... when using any Visual composer function that requires javascript triggers, Full width Span, slider, animations nothing gets loaded again when my ajax function triggers a content replace.
Here is part of my code that loads after ajax have got the content.
// Update the content
$content.stop(true,true);
//$("[data-vc-grid-settings]").vcGrid();
$('#content').foundation();
$content.html(contentHtml).ajaxify().css('opacity',100).show(); /* you could fade in here if you'd like */
// Update the title
document.title = $data.find('.document-title:first').text();
I thought .vcGrid()
was the right init, but got the not defined console error.
Where can I find docs related to re-initializing the visual composer elements?
<html>
<header>
Meta Content
</header>
<div off-canvus>
<menu></menu>
<div content>
<div inner-content>
</div>
</div>
<footer>
</footer>
<scripts>
</html>