...

View Full Version : slideToggle



nisus
10-21-2009, 02:25 PM
Hi,

I am using this jquery sliding menu

http://www.webresourcesdepot.com/sliding-top-menu-with-jquery/

Its working on onclick event.I wanted to make it to a mouseover/mouseout

there is a commetns saying use slideToggle()

But I am not sure how do I do that.I hope this is the place it edit.

<script type="text/javascript">
$(document).ready(function() {
$(".topMenuAction").mouseover( function() {
if ($("#openCloseIdentifier").is(":hidden")) {
$("#slider").animate({
marginTop: "-210px"
}, 500 );
$("#topMenuImage").html('<img src="open.png"/>');
$("#openCloseIdentifier").show();
} else {
$("#slider").animate({
marginTop: "0px"
}, 500 );
$("#topMenuImage").html('<img src="open.png"/>');
$("#openCloseIdentifier").hide();
}
});

});

</script>


Anyboday can help me
Thanks in advanced

nisus
10-21-2009, 06:23 PM
Please see the changes I have done


<script type="text/javascript">

$(document).ready(function() {
$(".topMenuAction").mouseover( function() {
if ($("#openCloseIdentifier").is(":hidden")) {
$("#slider").animate({
marginTop: "-210px"
}, 500 );
$("#openCloseIdentifier").show();
} else {
$("#slider").animate({
marginTop: "0px"
}, 500 );
$("#openCloseIdentifier").hide();
}

});

});


</script>

Please see the attached file.This yellow menu positioned right top corner of the page.when mouse over it its showing (like the image)

but when I mouse out from yellow color area its again not hiding again.Its only hiding if I move my mouse over the arrow (see the image).

Please show whats wrong in my code
Thanks

http://i38.tinypic.com/2rfeqet.jpg



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum