javascript - jQuery slidedown menu trigger makes menu slideup too quickly -
i have following html:
<div class="col-sm-12" id='dropdown_menu_group'> <div id='dropdown_library_menu'> <div class="row" id='dropdown_menu_row'> <div class="col-sm-2"> <a class='button-text btn' id='library_button' href="{{pathfor 'library'}}">my library</a> </div> <div class='col-sm-2 col-sm-pull-1' id='google_drive_text'> google drive </div> <div class="col-sm-2" id='settings_button'></div> </div> </div> <div id='dropdown_library_menu_border'></div> </div>
my id='dropdown_library_menu'
hidden default, , div below <div id='dropdown_library_menu_border'></div>
has opacity of 0, when scrolled over, makes id='dropdown_library_menu'
slide down. issue is, though, <div id='dropdown_library_menu_border'></div>
still there when menu slides down, , thus, when scroll on opacity 0 div triggers slidedown (inside of menu, @ point), tricks jquery thinking condition met:
'mouseout #dropdown_library_menu': function(ev){ ev.preventdefault(); $('#dropdown_library_menu').slideup('slow'); }
because technically, mousing out of dropdown menu , dropdown menu trigger.
i want make blank div move bottom of menu when slidedown
triggered, setting position relative
on parent , position absolute
on children totally messes webpage.
you can make slower,
'mouseout #dropdown_library_menu': function(ev){ ev.preventdefault(); $('#dropdown_library_menu').slideup(3000); // slide in 3 seconds, }
Comments
Post a Comment