Ajax Load causing plugins to need to be refreshed

2 replies · opened Aug 12, 2020

Mmichaelgr42Aug 12, 2020

I am using ajax on my site to dynamically load the content without refreshing the pages. This is causing issues with a lot of the plugins failing to reload,
It is specifically when I trigger a hash change event

$(window).trigger("hashchange");

The latest plugin this is causing issues with is the countdown clock from Mopment.js.
I am wondering is there a simpler solution the get these plugins to reload when I trigger a hash change event?

SSemicolon WebSTAFFAug 13, 2020

Hello,

JS Plugins are typically never triggered automatically (except built-in features) when using Custom AJAX Functionality. You will need to trigger them manually after the JS plugin related Elements are added on the Page. You can check the js/functions.js File and check the Functions used to trigger the Plugin. Example for the Countdown Plugin, use the SEMICOLON.widget.countdown(); Function inside your Callback.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Mmichaelgr42Aug 19, 2020

Thank You so Much :)

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard