1
0
Fork 0

Merge pull request #142 from simonlnu/master

make profiles-menu disappear when clicked outside of it
This commit is contained in:
Simon 2012-03-16 13:44:39 -07:00
commit c7dd52be62
2 changed files with 18 additions and 0 deletions

View file

@ -73,6 +73,15 @@ $(document).ready(function() {
$('#nav-notifications-linkmenu').click(function(event) { $('#nav-notifications-linkmenu').click(function(event) {
event.stopPropagation(); event.stopPropagation();
}); });
// click outside profiles menu closes it
$('html').click(function() {
$('#profiles-menu-trigger').removeClass('selected');
document.getElementById("profiles-menu").style.display = "none";
});
$('#profiles-menu').click(function(event) {
event.stopPropagation();
});
// main function in toolbar functioning // main function in toolbar functioning
function toggleToolbar() { function toggleToolbar() {

View file

@ -73,6 +73,15 @@ $(document).ready(function() {
$('#nav-notifications-linkmenu').click(function(event) { $('#nav-notifications-linkmenu').click(function(event) {
event.stopPropagation(); event.stopPropagation();
}); });
// click outside profiles menu closes it
$('html').click(function() {
$('#profiles-menu-trigger').removeClass('selected');
document.getElementById("profiles-menu").style.display = "none";
});
$('#profiles-menu').click(function(event) {
event.stopPropagation();
});
// main function in toolbar functioning // main function in toolbar functioning
function toggleToolbar() { function toggleToolbar() {