Hello,
I've got an very annoying problem with my navbar. When the visitor moves his cursor over a button, a submenu should appear with a slideDown-Effect and moving the mouse out of the button should have a slideToggle-Effect.
Unfortunately, many times when moving my mouse on the button, it slides down, slides up, slides down etc.
And stops randomly when being sliden down.
Code:
- <script>
-
- $(document).ready(function(){
- $("#main1").hover(function() {
- $("#sub1").slideDown(400);
- }, function() {
- $("#sub1").slideUp(400);
- });
- });
-
- </script>
Has anybody had the same problem? Or has a solution for it?
Hope it's understundable enough - otherwise: don't hesitate to ask.