Hi everyone!
I have a page on my site where I’m using JQuery’s .load function to load cms content from some other pages (to avoid the limit of 20 cms calls per page), and I’m also using Jetboost’s favorites feature to allow users to “favorite” any of those loaded cms items.
It nearly works perfectly, but it seems necessary to do a hard refresh of the page in order for Jetboost’s script to read/reference the loaded cms content with their api.
I’m wondering if this has to do with the locations of the scripts and the order they’re being executed? Or something else entirely? Much appreciate any help.
- Jetboost’s JS script (below) is in my custom code HEADER
<script id="jetboost-script" type="text/javascript"> window.JETBOOST_SITE_ID = "myclientIDstring"; (function(d) { var s = d.createElement("script"); s.src = "https://cdn.jetboost.io/jetboost.js"; s.async = 1; d.getElementsByTagName("head")[0].appendChild(s); })(document); </script>
- The JQuery .load script (below) that’s loading the cms content from the other pages is in my specific page’s custom code “BEFORE THE < / BODY > TAG”.
<script>
$( "#vlist1" ).load( "/visa-comparisons/visa-chart-list-1 #list1" );
$( "#mvisitor1" ).load( "/visa-comparisons/visa-chart-mobile-list-1 #m-visitor-1" );
$( "#mresidency1" ).load( "/visa-comparisons/visa-chart-mobile-list-1 #m-residency-1" );
$( "#mupdates1" ).load( "/visa-comparisons/visa-chart-mobile-list-1 #m-updates-1" );
</script>
Read-Only link for main page: LINK
Read-Only link for one of the subpages I’m loading cms content from: LINK