javascript - Cannot hold div when select email from autocomplete list -


below script create effect fade in , fade out when user hover mouse login box

<script> $("#login").hover(function() {     $("#loginform").slidetoggle('500').css('display', 'block'); }, function() {     $("#loginform").slidetoggle('500') }); </script> 

but when want select email <input type="name" name="email_address" />

enter image description here

this div #loginform automatically closed :

enter image description here

so how keep box show when user select email address autocomplete list ?

this issue happen in browser mozilla firefox.

fyi : change <input type="name" name="email" /> .. list gmail email address

jsfiddle

as drop-down created browser, jquery thinks mouse leaves #login , slide again. prevent happening, add delay slideup animation. created fiddle show mean.

$("#login").hover(function () {     $("#loginform").clearqueue().slidedown(500); }, function () {     $("#loginform").delay(1500).slideup('500'); }); 

note clearqueue() method. make sure when user has selected email , has mouse on element #login prevent slideup() happening.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -