Skip to content

Instantly share code, notes, and snippets.

@arturkot
Created March 13, 2013 11:42
Show Gist options
  • Save arturkot/5151337 to your computer and use it in GitHub Desktop.
Save arturkot/5151337 to your computer and use it in GitHub Desktop.
Examplary main JS
/*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