Skip to content

Commit

Permalink
replace the anonymous handler for document ready
Browse files Browse the repository at this point in the history
  • Loading branch information
murtaugh committed Aug 10, 2015
1 parent aa4b837 commit 8c819bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
27 changes: 5 additions & 22 deletions assets/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,10 @@
// b.setAttribute('data-platform', navigator.platform);


// remap jQuery to $
(function($){
function initPage(){

/* trigger when page is ready */
$(document).ready(function (){

// your functions go here

});


/* optional triggers
$(window).load(function() {
});
$(window).resize(function() {
});
*/
// your functions go here

})(window.jQuery);
console.log('page loaded');

};
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ <h2>Sidebar Content</h2>
<!-- this is where we put our custom functions -->
<!-- don't forget to concatenate and minify if needed -->
<script src="assets/js/functions.js"></script>
<script>$(document).ready(initPage);</script>

<!-- Asynchronous google analytics; this is the official snippet.
Replace UA-XXXXXX-XX with your site's ID and uncomment to enable.
Expand Down

0 comments on commit 8c819bf

Please sign in to comment.