Skip to content

Instantly share code, notes, and snippets.

@anareyna
Created August 26, 2013 00:58
Show Gist options
  • Save anareyna/6337283 to your computer and use it in GitHub Desktop.
Save anareyna/6337283 to your computer and use it in GitHub Desktop.
functions
var Ani = ( function() {
var st = {
txtName : '.txtName',
btnSearch : '#btnSearch'
},
dom = {},
catchDom = function() {
dom.txtName = $(st.txtName);
dom.btnSearch = $(st.btnSearch);
},
bindEvents = function() {
dom.txtName.on('mouseenter', validateForm);
},
runFunction = function() {
someFunction();
},
validateForm = function(event) {
event.preventDefault();
// declaration block ...
};
return {
init : function() {
catchDom();
bindEvents();
runFunction();
}
}
})();
$(function () {
Ani.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment