Im not that much of an expert on jQuery
im using this
$(window).scroll(function (event) {
var y = $(this).scrollTop();
if (y > 0) {
$('.smenu-lower').slideUp('fast');
}
else{
$('.smenu-lower').slideDown('fast');
}
});
to get my lower menu to slideUp on scroll down the page, and slideDown again once scrolled back to the top of the page. However i cant figure out how to get it to Slidedown when it isnt at the top when the user hovers over and then slideUp when the user hovers off
http://jsfiddle.net/YhrbW/1/ Uploaded it to here- United States
- Has been a member for 4-5 years
- Exclusive Author
- Author was Featured
- Sold between 50 000 and 100 000 dollars
- Item was Featured
- Contributed a Tutorial to a Tuts+ Site
- Author had a Free File of the Month
var win = $(window), lower = $('.smenu-lower');
win.scroll(function() {
slide(win.scrollTop() > 0);
});
$(".smenu").mouseenter(function() {
slide();
}).mouseleave(function() {
slide(true);
});
function slide(up) {
if(up) {
lower.slideUp('fast');
}
else {
lower.slideDown('fast');
}
}
Thank you for your help, however this doesnt seem to work? at all? 
- United States
- Has been a member for 4-5 years
- Exclusive Author
- Author was Featured
- Sold between 50 000 and 100 000 dollars
- Item was Featured
- Contributed a Tutorial to a Tuts+ Site
- Author had a Free File of the Month
Renny said
Thank you for your help, however this doesnt seem to work? at all?![]()
I first wrote the code, then saw your fiddle and updated it 
- United States
- Has been a member for 4-5 years
- Exclusive Author
- Author was Featured
- Sold between 50 000 and 100 000 dollars
- Item was Featured
- Contributed a Tutorial to a Tuts+ Site
- Author had a Free File of the Month
Here’s the final version as I assume you want the sticky always showing when scrollTop = 0
http://jsfiddle.net/YhrbW/6/CodingJack said
Here’s the final version as I assume you want the sticky always showing when scrollTop = 0 http://jsfiddle.net/YhrbW/6/
You really are awesome! many many thanks ! 
Edit: found the solution changed the .smenu target to the #Sticky-Menu instead thanks again!
2nd Edit: Not sure why but it works fine on jsfiddle but in my document it doesnt work at all
?
Renny said
CodingJack said
Here’s the final version as I assume you want the sticky always showing when scrollTop = 0 http://jsfiddle.net/YhrbW/6/You really are awesome! many many thanks !
Edit: found the solution changed the .smenu target to the #Sticky-Menu instead thanks again!
2nd Edit: Not sure why but it works fine on jsfiddle but in my document it doesnt work at all?
cant edit my last post, but now all fixed 
