| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/school-anc/jquerymobile/demos/backbone-requirejs/js/ |
Upload File : |
// Sets the require.js configuration for your application.
require.config( {
baseUrl: "../js",
// 3rd party script alias names
paths: {
// Core Libraries
"jquery": "jquery",
"jquerymobile": "jquery.mobile-1.4.5",
"underscore": "//cdn.jsdelivr.net/lodash/2.4.1/lodash.min",
"backbone": "//cdn.jsdelivr.net/backbonejs/1.1.2/backbone-min",
"backbone-requirejs-demos": "../backbone-requirejs/js"
},
// Sets the configuration for your third party scripts that are not AMD compatible
shim: {
"backbone": {
"deps": [ "underscore", "jquery" ],
"exports": "Backbone"
}
}
});
// Includes File Dependencies
require([
"jquery",
"backbone",
"backbone-requirejs-demos/routers/mobileRouter"
], function ( $, Backbone, Mobile ) {
$( document ).on( "mobileinit",
// Set up the "mobileinit" handler before requiring jQuery Mobile's module
function () {
// Prevents all anchor click handling including the addition of active button state and alternate link bluring.
$.mobile.linkBindingEnabled = false;
// Disabling this will prevent jQuery Mobile from handling hash changes
$.mobile.hashListeningEnabled = false;
}
)
require( [ "jquerymobile" ], function () {
// Instantiates a new Backbone.js Mobile Router
this.router = new Mobile();
});
});