mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +00:00
close one menu (like the notifications menu) when another one is opened (like it is done when clicking somewhere else) (thx to ^mw)
This commit is contained in:
parent
def6f0b408
commit
ab908469ae
1 changed files with 10 additions and 6 deletions
16
js/main.js
16
js/main.js
|
@ -73,7 +73,16 @@
|
|||
setupFieldRichtext();
|
||||
|
||||
/* popup menus */
|
||||
function close_last_popup_menu() {
|
||||
if(last_popup_menu) {
|
||||
last_popup_menu.hide();
|
||||
last_popup_button.removeClass("selected");
|
||||
last_popup_menu = null;
|
||||
last_popup_button = null;
|
||||
}
|
||||
}
|
||||
$('a[rel^=#]').click(function(e){
|
||||
close_last_popup_menu();
|
||||
menu = $( $(this).attr('rel') );
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
@ -90,12 +99,7 @@
|
|||
return false;
|
||||
});
|
||||
$('html').click(function() {
|
||||
if(last_popup_menu) {
|
||||
last_popup_menu.hide();
|
||||
last_popup_button.removeClass("selected");
|
||||
last_popup_menu = null;
|
||||
last_popup_button = null;
|
||||
}
|
||||
close_last_popup_menu();
|
||||
});
|
||||
|
||||
// fancyboxes
|
||||
|
|
Loading…
Reference in a new issue