HighDots Forums  

[JQUERY] Problema di velocità su hover

Javascript (Italian) Il linguaggio JavaScript (it.comp.lang.javascript)


Discuss [JQUERY] Problema di velocità su hover in the Javascript (Italian) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
LostCore
 
Posts: n/a

Default [JQUERY] Problema di velocità su hover - 05-04-2008 , 06:30 PM






Ciao a tutti, spero possiate aiutarmi con questo annoso problema, non
so davvero dove sbattere la testa!

Dunque, devo creare un menu orizzontale, i cui pulsanti, al passaggio
del mouse, cambiano nella loro versione "over". ho questo codice:

------------------
$(".menu").livequery(function(){
$(this).hover(function(){
//... inizializzazione di new_img, l'immagine da
sostituire per l'hover
//...
$(this).replaceWith(new_img);
},function(){
//... inizializzazione di new_img, l'immagine da sostituire
per il mouseout
//...
$(this).replaceWith(new_img);
});
},function(){
// unbind the mouseover and mouseout events
$(this).unbind('mouseover').unbind('mouseout');
});
------------------

Funziona tutto a meraviglia, le immagini si scambiano. Il problema
nasce quando il mouse passa velocemente su una immagine o lungo tutto
il menu: il mouse out non viene più calcolato! Come se lo script non
fosse abbastanza veloce da rilevare l'uscita del mouse.

Com'è possibile? Grazie mille!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.