Commit 5f996dea authored by Sven Franck's avatar Sven Franck

jqm_3: updated to no CDN files

parent b9133cd0
...@@ -24,6 +24,10 @@ define([], function () { ...@@ -24,6 +24,10 @@ define([], function () {
.each( .each(
function () { function () {
// trigger gadget loading // trigger gadget loading
RenderJs.bindReady(
function () {
$("[data-gadget]").trigger('create');
});
} }
); );
}); });
......
...@@ -5,12 +5,6 @@ ...@@ -5,12 +5,6 @@
<style type="text/css"> <style type="text/css">
div.ui-btn {border:2px solid red !important;} div.ui-btn {border:2px solid red !important;}
</style> </style>
<script type="text/javascript">
// this is problematic, because when this code is run, the widget
// has not initialized, meaning, the input parent div.ui-btn has not
// been created yet!
$('#but2').closest('div').css("border","2px solid yellow");
</script>
</head> </head>
<body> <body>
...@@ -19,6 +13,11 @@ ...@@ -19,6 +13,11 @@
<input type="button" id="but2" data-icon="delete" data-iconpos="left" data-theme="e" value="click me 2" /> <input type="button" id="but2" data-icon="delete" data-iconpos="left" data-theme="e" value="click me 2" />
<a href="page2.html" data-role="button" data-icon="arrow-l" data-iconpos="left" data-theme="c">Link</a> <a href="page2.html" data-role="button" data-icon="arrow-l" data-iconpos="left" data-theme="c">Link</a>
</div> </div>
<script type="text/javascript">
// this is problematic, because when this code is run, the widget
// has not initialized, meaning, the input parent div.ui-btn has not
// been created yet!
$('#but2').closest('div').css("border","2px solid yellow");
</script>
</body> </body>
</html> </html>
This diff is collapsed.
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <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="css/jqm.css" />
<script data-main="js/require-renderjs.js" type="text/javascript" src="../../lib/require/require.js"></script> <script data-main="js/require-renderjs.js" type="text/javascript" src="../../lib/require/require.js"></script>
<title>My own example</title> <title>My own example</title>
</head> </head>
......
...@@ -9,6 +9,9 @@ define([], function () { ...@@ -9,6 +9,9 @@ define([], function () {
require(['overrides', 'jquery', 'jqm', 'jquery.json', 'renderjs'], require(['overrides', 'jquery', 'jqm', 'jquery.json', 'renderjs'],
function () { function () {
console.log("done loading"); console.log("done loading");
console.log( $ );
console.log( $.mobile );
console.log( $.mobile.autoInitializePage );
// START // START
if ($.mobile.autoInitializePage === false) { if ($.mobile.autoInitializePage === false) {
// initialize JQM // initialize JQM
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
controller: 'controller' controller: 'controller'
, overrides: 'overrides' , overrides: 'overrides'
, jquery: '../../../lib/jquery/jquery' , jquery: '../../../lib/jquery/jquery'
, jqm: 'http://code.jquery.com/mobile/1.3.0-rc.1/jquery.mobile-1.3.0-rc.1.min' , jqm: 'jqm'
, 'jquery.json':'../../../lib/json/jquery.json.min' , 'jquery.json':'../../../lib/json/jquery.json.min'
, renderjs: '../../../renderjs' , renderjs: '../../../renderjs'
} }
......
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