Created
April 28, 2016 12:57
-
-
Save renanlara/6d0878879d88f241e3c281cfd6234b04 to your computer and use it in GitHub Desktop.
Depois eu explico.
This file contains 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(){ | |
// Event Click in whatever tag HTML | |
$( '#section' ).click(function(event){ | |
event.stopPropagation(); | |
$( '.button' ).toggleClass('open'); | |
}); | |
// Function click out and close function up | |
$( document ).click( function() { | |
var btn = $( '.button' ); | |
if(btn.hasClass( 'open' )) { | |
btn.removeClass( 'open' ); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment