-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
26 lines (20 loc) · 903 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$(document).on('click', 'ul.dropdown-menu.stay li a', function (e) {
// stop the link href action, then stop the menu from closing if it isn't the Close Menu (.close) link
e.preventDefault();
if ( $(this).attr('id') == 'navbar-login-submit' )
AttemptLoginNav();
if ( $(this).hasClass('dd-close') )
return;
e.stopPropagation();
e.stopImmediatePropagation();
$(this).parents('ul.dropdown-menu').toggleClass('open');
var isCheckMenu = ($(this).parents('ul.dropdown-menu').hasClass('check'))?true:false;
// now handle the click itself
if ( isCheckMenu ) {
if ( $(this).parents('li').hasClass('checked') ) {
$(this).parents('li').removeClass('checked');
} else {
$(this).parents('li').addClass('checked');
}
}
});