I tried to put a timer on the on the code below so the mouseenter event handler doesn’t fire for a couple of seconds. I understand the abstract of the setTimeout method, but I cannot figure out how to incorporate it into this code. And I screw it up every time I try.
I am trying to animate (increase) the height of the pageFooterContent div on mouseenter, and decrease it on mouseleave. Here is the page on which I would like to do this http://galileedetroit.org/index2.php. Pertinent code is below. Any help would be greatly appreciated.
HTML
<!-- BEGIN PAGE FOOTER -->
<footer id="pageFooter">
<!-- BEGIN PAGE FOOTER CONTENT -->
<div id="pageFooterContent">
</div>
<!-- END PAGE FOOTER CONTENT -->
</footer>
<!-- END PAGE FOOTER -->
Hey! I appreciate the suggestion. I did use the delay() method before. That was one of my first ideas. But the problem is that the function “remembers” the mouseenter event no matter how quickly it happens. If I pass my mouse over the pageFooter div, the function just fires after 2000 ms, no matter where I may be on the page thereafter. I have seen a timer used on something like this before. Check out the code below. I tried to modify this code to do what I wanted it to do, but I kept screwing it up. Remember, I am using animate versus hide/show, and versus slideUp/slideDown.