The cause of problem 1 and 3 is that your functions are all nested
inside each other. You don't really need to check if they're visible
or not so you can dump the 'visible' checks. You could also change it
so rather than sliding up when you mouse out of the heading, it slides
when you mouseout of the newly appeared menu. So, this should (more-or-
less) work (totally untested though):

$(document).ready(function() {

                        $('.menu-details').hide();

                        $('#a-index').mouseover(function() {
                              $('#menu-details-index').slideDown();

                        });

                        $('#menu-details-index'').mouseout(function()
{
                              $(this).slideUp();
                        });

                        $('#a-buyers').mouseover(function() {
                              $('#menu-details-buyers').slideDown();
                        });

                        $('#menu-details-buyers').mouseout(function()
{
                              $(this).slideUp();
                        });
                });

});

Via la

On Jan 16, 4:46 pm, "Rick Faircloth" <[EMAIL PROTECTED]> wrote:
> Hi, all.
>
> I'm still trying to work out a drop-down div
> for my horizontal menu.
>
> I've tried various approaches and the closest I've
> been able to come to the proper animation so far
> (which still isn't correct) is with this code
> (written in long-form for now and just
> for the first two menu items):
>
>                 $(document).ready(function() {
>
>                         $('.menu-details').hide();
>
>                         $('#a-index').mouseover(function() {
>                                 var answer = $('#menu-details-index');
>                                 if (answer.is(':not visible'))
>                                         answer.slideDown();
>
>                         $('#a-index').mouseout(function() {
>                                 var answer = $('#menu-details-index');
>                                 if (answer.is(':visible'))
>                                         answer.slideUp();
>
>                         $('#a-buyers').mouseover(function() {
>                                 var answer = $('#menu-details-buyers');
>                                 if (answer.is(':not visible'))
>                                         answer.slideDown();
>
>                         $('#a-buyers').mouseout(function() {
>                                 var answer = $('#menu-details-buyers');
>                                 if (answer.is(':visible'))
>                                         answer.slideUp();
>                         })
>                         });            
>                         });
>                         });
>                 });
>
> You can see the results of my efforts so far athttp://c21ar.wsm-dev.com.
>
> The problems I'm trying to overcome:
>
> - the 'drop-down div' works only if the first menu item "Home" is mouse-over 
> first
>
> - once the div drops, and I mouse-off the link, the div closes...of course I 
> need it to stay open
>   unless I mouse-off the link or the corresponding drop-down div
>
> - after I mouse-over the first two links quite a few times, even slowly, I 
> get an alert error
>   that states "Stack overflow at line: 1"  What does that mean and can this 
> be overcome or is
>   my 'drop-down div' menu inherently flawed?  I have to refresh the page to 
> get the menu working
> again
>
> - lastly, but my significantly, I've got to figure out a way to have the 
> system realize what
>   content should be displayed in the drop-down div based on the menu link 
> that is moused-over
>
> Would someone care to show me some code that would help with any of these 
> problems?
> If this is going to take someone too much time to help out "vacuus persolvo", 
> I'm willing to
> purchase something off a wish-list or even to pay for some hand-holding.
>
> The problem I face is time... I'm working on a fairly extensive Real Estate 
> site and I need to
> get past this piece of the puzzle.  If I can't solve it soon, I'll just have 
> to go to a regular
> drop-down menu, which I'd rather avoid.
>
> I just haven't come far enough with jQuery to code this myself...it's too 
> complex for me at this
> point.
>
> Thanks!
>
> Rick

Reply via email to