diff options
author | makefu <github@syntax-fehler.de> | 2014-05-21 18:26:18 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2014-05-21 18:26:18 +0200 |
commit | 720176d791425eacb777979a5041f63ade48eae5 (patch) | |
tree | f9972b0347f23297183c9811efc5427106a1fd0b /pelican-themes/gum/static/js/libs/gumby.init.js | |
parent | b58fa13180981afce4f17b4d59b739d79a5873f5 (diff) |
add theme
Diffstat (limited to 'pelican-themes/gum/static/js/libs/gumby.init.js')
-rw-r--r-- | pelican-themes/gum/static/js/libs/gumby.init.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pelican-themes/gum/static/js/libs/gumby.init.js b/pelican-themes/gum/static/js/libs/gumby.init.js new file mode 100644 index 0000000..e14f7e2 --- /dev/null +++ b/pelican-themes/gum/static/js/libs/gumby.init.js @@ -0,0 +1,27 @@ +/** +* Gumby Init +*/ + +// test for touch event support +Modernizr.load({ + test: Modernizr.touch, + + // if present load custom jQuery mobile build and update Gumby.click + yep: 'js/libs/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); + } + } +}); |