SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    how to use jquery to do this navigation?

    ????-?(www.net.cn)

    http://www.sitepoint.com/forums/atta...1&d=1310736398

    when the mouse hovers on the first li, under it shows a text line. when hovers on the second li, under it shows a sub navigation rows.

    eg:if the following is my html structure:
    Code:
    <div class="nav-top">
      <ul>
      <li class="navahead current"><a href="/">home</a></li>
      <li class="navahead"><a href="#">code</a></li>
      <li class="navahead"><a href="#">book</a></li>
      <li class="navahead"><a href="#">test</a></li> 
      </ul>
      </div>
    how to layout the subnav?
    eg: the home's subnav is a text line: "welcome to my site"
    the code's subnv is "php asp java ..."
    Attached Images Attached Images

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    You don't really need JavaScript. Here's a CSS example. Just view source to see how it's built.

    Drop down Menu

  3. #3
    SitePoint Evangelist runeveryday's Avatar
    Join Date
    Jul 2009
    Posts
    437
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    You don't really need JavaScript. Here's a CSS example. Just view source to see how it's built.

    Drop down Menu
    nope,it used js which named(ddown.js)

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,198
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by runeveryday View Post
    nope,it used js which named(ddown.js)
    It works without JS. The JS is just there to help browsers like IE6 that don't support li:hover. Essentially irrelevant now.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •