Created
June 10, 2013 15:08
-
-
Save vinicius73/5749496 to your computer and use it in GitHub Desktop.
Base de js para projetos
This file contains hidden or 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
$(document).ready(function () { | |
SiteHome.init(); | |
SiteCommons.init(); | |
}); | |
/** | |
* Grid gererator da homepage | |
* @type {{init: Function, run: Function}} | |
*/ | |
var SiteHome = { | |
init: function () { | |
//Valida se ação deve ser executada | |
//case nessessário executa exceções | |
}, | |
run: function () { | |
//Executa os scripts de fato | |
} | |
}; | |
/** | |
* Funções comuns ao site | |
* @type {{init: Function, sliders: Function, tooltip: Function}} | |
*/ | |
var SiteCommons = { | |
init: function () { | |
if ($.fn.cycle) { | |
this.sliders(); | |
} | |
if ($.fn.tooltip) { | |
this.tooltip(); | |
} | |
if ($.fn.tinyNav) { | |
this.menu(); | |
} | |
}, | |
sliders: function () { | |
//Executa os scripts de fato | |
}, | |
tooltip: function () { | |
//Executa os scripts de fato | |
}, | |
menu: function(){ | |
//Executa os scripts de fato | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment