Try using Toggle, rather than Click. That should work.
Glen
On Fri, Jun 27, 2008 at 3:28 PM, Cristian [EMAIL PROTECTED] wrote:
HI,
I'm using the code below to create a hover effect. When the user puts
the mouse over a div box1 a list of items appear, and when it goes
out, the list
try this hover
$(document).ready(function() {
$(#box1).bind('mouseover', function() {
$(.ul-list).css({display: 'block'});
});
$(#box1).bind('mouseout', function() {
$(.ul-list).css({display: 'none'});
});
});
click toggle
Also you can do this:
$(document).ready(function() {
$(#box1).toggle(function() {
$(.ul-list).show();
},function() {
$(.ul-list).hide()
});
});
hide/show do what you need.
Glen
On Fri, Jun 27, 2008 at 4:51 PM, Glen Lipka [EMAIL PROTECTED]
I changed Click for Toggle and it worked!
Thank you very much, guys.
4 matches
Mail list logo