Commit d4ce6623 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use requirejs in examples/jqm.

parent 187cf662
......@@ -5,14 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.css" />
<link rel="stylesheet" href="jqm-gadget.css" />
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<script src="http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min.js"></script>
<script src="../../renderjs.js"></script>
<!-- XXX:Using requirejs is not working with JQM -->
<!-- <script data-main="require-renderjs.js"
<script data-main="require-renderjs_jqm.js"
type="text/javascript"
src="../../lib/require/require.js"></script>-->
src="../../lib/require/require.js"></script>
</head>
......@@ -37,17 +32,6 @@
</div>
<script type="text/javascript">
$(document).ready(function() {
// explicitly call required as requirejs call not working
RenderJs.init();
// when all gadgets are loaded make sure JQM renders them
RenderJs.bindReady(
function () {
$("[data-gadget]").trigger('create');
});
});
</script>
</body>
......
// JavaScript file that is used to load RenderJs depenencies
require.config({
baseUrl: "../..",
paths: {
jqm: "lib/jqm/jquery.mobile-1.3.0-rc.1.min"
},
shim: {
jqm: [ "jquery" ]
}
});
require([ "require-renderjs", "renderjs", "jqm" ], function(domReady) {
// when all gadgets are loaded make sure JQM renders them
RenderJs.bindReady(
function () {
$("[data-gadget]").trigger('create');
}
);
});
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment