racket/new-racket-web/plt-web-pkgs/plt-web-lib/resources/js/libs/gumby.init.js
Matthew Flatt 8ae703cb24 reorganize into packages: "plt-web" and "plt-new-services"
The "plt-new-services" package defines the "meta/new-web"
collection, with the idea that it will be merged into
"plt-services" and later replace "meta/web".
2014-03-01 19:55:58 -07:00

28 lines
592 B
JavaScript

/**
* Gumby Init
*/
// test for touch event support
Modernizr.load({
test: Modernizr.touch,
// if present load custom jQuery mobile build and update Gumby.click
yep: Gumby.path+'/jquery.mobile.custom.min.js',
callback: function(url, result, key) {
// check jQuery mobile has successfully loaded before using tap events
if($.mobile) {
window.Gumby.click = 'tap';
}
},
// either way initialize Gumby
complete: function() {
window.Gumby.init();
// if AMD return Gumby object to define
if(typeof define == "function" && define.amd) {
define(window.Gumby);
}
}
});