init func

This commit is contained in:
Adam Bradley
2013-08-23 12:05:26 -05:00
parent 8fbc1a1745
commit ed4fc55937
3 changed files with 47 additions and 1 deletions

View File

@ -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>

View File

@ -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 || {});

View File

@ -1 +0,0 @@
/* the eventual location of the minified/concat js, all others would be excluded */