Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Help with jquery sliding menu
Old 09-11-2009, 06:29 PM Help with jquery sliding menu
Super Talker

Posts: 132
Trades: 0
here is the site, it's the top nav. http://gilleardmarketing.com/index.php

On the top nav when you hover over Internet Marketing that's the effect I want but I can't figure out how to make it stay down depending on where my mouse is. I want it to be able to click on the links.

HTML:

Code:
<div id="topnav">
    <ul id="menu">
        <li><a href="index.php" class="logo"><span></span></a></li>
        <li><a href="index.php" class="home"><span></span></a></li>
        <li><a href="about.php" class="about"><span></span></a></li>
        
        <li><a href="http://www.gm-research.com" class="marketresearch"><span></span></a></li>
        <li><a href="strategy.php" class="strategy"><span></span></a></li>
        <li><a id="internetmarketing" class="internetmarketing" href="internet-marketing.php"><span class="internetmarketingSpan"></span></a></li>
        
        <li><a href="traditional-marketing.php" class="printmarketing"><span></span></a></li>
        <li><a href="testimonials.php" class="testimonials"><span></span></a></li>
        <li><a href="contact.php" class="contact"><span></span></a></li>
    </ul>
    
    
            <ul class="menu_body" id="menu_body">
                <li><a href="internet-marketing.php">Internet Marketing Program</a></li>
                <li><a href="website-marketing-upgrade.php">Website Marketing Upgrade</a></li>
                <li><a href="internet-marketing-mgmt.php">Internet Marketing Management</a></li>
            </ul>
  
</div>
Here's the js and jquery:

Code:
    
    document.onmousemove = findMouse;

function findMouse(e) {
    if (!e)
    {
        e = window.event;
    }
    
    if(e.target){
        eTarg = e.target; 
    }else{
        eTarg = e.srcElement;
    }
    
    if(eTarg.className == "internetmarketingSpan") {
        $('ul.menu_body').slideDown('normal');
    }else if(eTarg.className == "menu_body") {
        return false;
    }else {
        $('ul.menu_body').slideUp('normal');
    }
}
I was trying to target window objects and it was working but it wouldn't work in this situation for some reason.

Thanks for any help!

EDIT: Included all code, made a mistake before.

Last edited by soap; 09-14-2009 at 05:25 PM..
soap is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Help with jquery sliding menu
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.21207 seconds with 12 queries