Skip to content

Instantly share code, notes, and snippets.

@pbojinov
Last active December 18, 2015 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbojinov/5700098 to your computer and use it in GitHub Desktop.
Save pbojinov/5700098 to your computer and use it in GitHub Desktop.
/**
* Declaration
*/
(function($) {
$.jPanelMenu = function(options) {
var jpm = {
options: $.extend({
'animated': true,
'duration': 500,
'direction': 'left'
}, options),
openMenu: function( ) {
//…
this.setMenuStyle( );
},
closeMenu: function( ) {
//…
this.setMenuStyle( );
},
setMenuStyle: function( ) { //… }
};
return {
open: jpm.openMenu,
close: jpm.closeMenu,
someComplexMethod: function( ) { //… }
};
};
})(jQuery);
/**
* Usage
*/
var jpm = $.jPanelMenu({
duration: 1000,
//…
});
jpm.open( );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment