I am using the code below to show and hide a div called "map" When a link with id 'goo' is clicked the map is shown using .slideDown, but when the link is clicked again it is SUPPOSE to use .slideUp to hide the map but nothing happens.
Here is the Javascript:
$('#goo').live('click',function() {
if ($("#map").css('visibility','hidden')){
$('#map').slideDown('slow');
$("#map").css('visibility','visible');
$("#map").css('position','relative');
} else {
$('#map').slideUp('slow');
}
return false;
});
If anyone has any idea where the div won't slide up, let me know!
Use slideToggle method
$('#goo').live('click',function() {
$('#map').slideToggle('slow');
return false;
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With