mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
init func
This commit is contained in:
@ -0,0 +1,25 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="../dist/framework-structure.css">
|
||||||
|
<link rel="stylesheet" href="../dist/framework-theme-default.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header class="bar-header">
|
||||||
|
<a class="button-prev" href="#">
|
||||||
|
Previous
|
||||||
|
</a>
|
||||||
|
<h1 class="title">Willkommen!</h1>
|
||||||
|
</header>
|
||||||
|
<div class="content">
|
||||||
|
<p>
|
||||||
|
Here is some content
|
||||||
|
</p>
|
||||||
|
<a class="button button-default">Click me</a>
|
||||||
|
<form>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<footer class="bar-footer">
|
||||||
|
</footer>
|
||||||
|
<script src="../js/framework/framework-init.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@ -0,0 +1,22 @@
|
|||||||
|
(function(window, document, $) {
|
||||||
|
|
||||||
|
$.init = function() {
|
||||||
|
if(!$._init) {
|
||||||
|
$._init = true;
|
||||||
|
console.log("Framwork init!");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if ( document.readyState === "complete" ) {
|
||||||
|
setTimeout( $.init, 1 );
|
||||||
|
} else {
|
||||||
|
if ( document.addEventListener ) {
|
||||||
|
document.addEventListener( "DOMContentLoaded", $.init, false );
|
||||||
|
window.addEventListener( "load", $.init, false );
|
||||||
|
} else if ( document.attachEvent ) {
|
||||||
|
document.attachEvent( "onreadystatechange", $.init );
|
||||||
|
window.attachEvent( "onload", $.init );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})(this, document, this.FW || {});
|
||||||
1
js/framework/framework.min.js
vendored
1
js/framework/framework.min.js
vendored
@ -1 +0,0 @@
|
|||||||
/* the eventual location of the minified/concat js, all others would be excluded */
|
|
||||||
Reference in New Issue
Block a user