Skip to content

Instantly share code, notes, and snippets.

@prosenjit-manna
Last active November 20, 2015 05:02
Show Gist options
  • Save prosenjit-manna/a640f146107a33a307c6 to your computer and use it in GitHub Desktop.
Save prosenjit-manna/a640f146107a33a307c6 to your computer and use it in GitHub Desktop.
Main JS coding style
'use strict';
// jQuery No Conflict
$.noConflict();
(function( $ ) {
//
var app = {
// navigation toogle show and hide
togglenavigation : function (options) {
var tConf = $.extend({
elm : $('.js-toggle-nav-button'),
wrap : $('.nav-popup-wrap'),
tgClass : 'nav-popup-wrap-open-state'
},options);
tConf.elm.on('click',function(){
tConf.wrap.toggleClass(tConf.tgClass);
});
}
};
app.togglenavigation();
}( jQuery ));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment