Skip to content

Instantly share code, notes, and snippets.

@blowery
Last active December 16, 2015 12:59
Show Gist options
  • Select an option

  • Save blowery/5438392 to your computer and use it in GitHub Desktop.

Select an option

Save blowery/5438392 to your computer and use it in GitHub Desktop.
define([ "jquery-ui" ], function(jqui) {
return {
init: function() {
$(".datepicker").datepicker();
}
}
});
require.config({
paths: {
'jquery': '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min',
'jquery-ui': "/html/js/libs/jquery-ui"
},
shim: {
'jquery-ui' : {
deps: ['jquery'],
exports: "$.datepicker"
}
}
});
require([
'app',
'jquery-ui'
], function(App){
App.initialize();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment