Created
March 13, 2013 11:42
-
-
Save arturkot/5151337 to your computer and use it in GitHub Desktop.
Examplary main JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint browser: true, nomen: true */ | |
/*globals jQuery */ | |
(function ($) { | |
"use strict"; | |
var App = { | |
/** | |
* Init Function | |
*/ | |
init: function () { | |
$('body').removeClass('no-js'); | |
this.fn1(); | |
this.fn2(); | |
}, | |
/** | |
* Project's properties | |
* Useful in case of bigger apps | |
*/ | |
props: { | |
// Exemplary props | |
mainSlideshowId = '#el', | |
videoActive: false | |
}, | |
/** | |
* Elements accessible within a scope of this object | |
*/ | |
gE: { | |
// Exemplary Utilities | |
is7: $('html').hasClass('ie7'), | |
isOldie: $('html').hasClass('oldie'), | |
// Examplary jQuery Els | |
$win = $(window) | |
}, | |
fn1: function () { | |
}, | |
fn2: function () { | |
} | |
}; | |
$(function () { ReviewsApp.init(); }); | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment