jQuery End Event

Hi Experts-

I have the following code and it works by hiding the navmenu when the user scrolls.  The problem is that after they've scrolled to the proper location, the navmenu doesn't re-appear.

Can you tell me how to have it disappear while the user is scrolling, but reappear after they've stopped moving the scroll bar?


Any help would be appreciated.
<script type="text/javascript">
	$(document).ready(function() {
		$(window).scroll(function() {
			$("#navmenu").css( {
				display: "none"
				});
			});
		});
</script>

Open in new window

LVL 1
quaziblueAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tdotCommented:
0
tdotCommented:
Then do something like this....
<script type="text/javascript">
        $(document).ready(function() {
                $(window).scroll(function() {
                        $("#navmenu").css( {
                                display: "none"
                                });
                        });
         
        $(window).bind('scrollstop', function(){
        $("#navmenu").show();});
    });
 });
</script>
0
quaziblueAuthor Commented:
Is there a way to do it without downloading another plugin?  I'm trying to keep the amount of code to a minimum.  I would think there would be an even that is associated with a scroll stop already in the latest release of jquery.

I just thought of something.  What if I animate the navmenu for a few milliseconds, enough for the scroll to complete.  If you have an idea on how to do this, let me know.  I'm new with jQuery and it took me 45 minutes to come up with the above code.

Thanks.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

quaziblueAuthor Commented:
I can't figure it out.  I went to the link you suggested and there is nothing to download.
0
quaziblueAuthor Commented:
Just figured it out.
0
quaziblueAuthor Commented:
And here she is.  Ain't she a beauty?
<script type="text/javascript">
	$(document).ready(function() {
		$(window).scroll(function () { 
		      $('#navmenu').css('display', 'none').fadeIn('slow'); 
		});
	});
</script>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.