Skip to content

Commit

Permalink
Suporte a toggle de visualização para navegação responsiva
Browse files Browse the repository at this point in the history
  • Loading branch information
mateussouzaweb committed Sep 21, 2015
1 parent 959f9c2 commit bcaeba9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion js/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,20 @@

}

/**
* Toggle navigation
* @return {void}
*/
Navigation.prototype.toggle = function(){

if( this.NAV.hasClass(this.CLASS) ){
this.hide();
}else{
this.show();
}

}

$.fn.navigation = function(action){
return new Navigation(this, action);
};
Expand Down Expand Up @@ -349,7 +363,7 @@ jQuery(function($){

// Navigation
$('.navigation').on('click', '.navigation-icon', function(e){
$(this).parents('.navigation').navigation('show');
$(this).parents('.navigation').navigation('toggle');
e.preventDefault();
});

Expand Down

0 comments on commit bcaeba9

Please sign in to comment.