Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Can you use a page's existing jQuery in steal?

$
0
0
No.  Now my /js/jquery.min.js is being loaded twice and interfering with plugins attached (mainly twitter bootstrap.js). 

UPDATE:

https://forum.javascriptmvc.com/topic/use-an-app-in-existing-page-with-jquery-loaded

  1. steal.config({
        map: {
            "*": {
                "jquery/jquery.js" : "jquery",
                "can/util/util.js": "can/util/jquery/jquery.js"
            }
        },
        paths: {
            "jquery": {src: "/js/jquery.min.js", ignore: true} // <--
        },
        shim : {
            jquery: {
                exports: "jQuery"
            }
        },
        ext: {
            js: "js",
            css: "css",
            ejs: "can/view/ejs/ejs.js"
        }
    })

Viewing all articles
Browse latest Browse all 3491