• Swedes

    Need to write jQuery and not $. This breaks third party js libs. Whats is the correct way to include 3party modules only when the plugin is used. In my case a widget that is only used on one page.

  • Global Moderator

    It's not disabled, works just fine.

  • Swedes

    If you use it in a template file, then its disabled.

    I get
    Uncaught ReferenceError: $ is not defined


     $("#msgid").html("This is Hello World by JQuery");
    This is Hello World by HTML
    <div id="msgid">

    What is the correct way to load jQuery into a plugin? Do I you use plugin.json to enable this?

    "scripts": [
    "acpScripts": [

    Should scripts be used for public scripst to like jquery? Jquery must be enabled by default right?

  • Global Moderator

    If you have your code in the scripts in plugin.json, jQuery will be available when they run.

    Scripts in templates can run before jQuery loads into the page.

  • Swedes

    ok, so html widgets and template files need to check if jQuery is loaded. But script added by script tag in plugin.js allways have jquery support 🙂

Suggested Topics

| |