Javascript embedded in the widget can't access the jquery object on page load since jquery hasn't loaded yet. You can use something like this
(function() { function onLoad() { // widget code } if (window.jQuery) { onLoad(); } else { window.addEventListener('DOMContentLoaded', onLoad); } })();Plugin Development
Have a question about building a plugin? Ask here
425
Topics
1.9k
Posts
-
Accesing JQuery in widget template
Unsolved -
-
-
-
-
-
Hide category from feeds
Unsolved -
-
-
-
Use Websockets in own Plugin
Solved -
-
Send invite without a user
Unsolved -
-
-
-
-
-
-
Copyright © 2024 NodeBB | Contributors