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
{{ message }}
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.
Just noticed a warning that says: The DOM element you tried to initiate the plugin on, does not exist
This happens if there are more than one scripts for different feeds but only one of them (or none) is called on a page. How to initiate the script only if the element is present?
Link for demonstration: http://themes.iki-bir.com/inst/
The text was updated successfully, but these errors were encountered:
Hi @elemis
That is actually a safe shift. If the DOM element isn't there it stops the rest of the script to be executed, and in that way, it never gets initiated for that DOM element. I have on my todo to include a boolean if you want ket debugging logged to the console.
For now, you could just make the check your self before trying to initiate the plugin: if($('#demo1').length > 0) { $('#demo1').instastory({ ... }); }
Just noticed a warning that says:
The DOM element you tried to initiate the plugin on, does not exist
This happens if there are more than one scripts for different feeds but only one of them (or none) is called on a page. How to initiate the script only if the element is present?
Link for demonstration: http://themes.iki-bir.com/inst/
The text was updated successfully, but these errors were encountered: