开发者

jQuery carousel style sliding navigation menu

I currently have a navigation menu with 2 lines; a topnav and a subnav which appears when hovering over the relevant menu item (all done via done via CSS).

Essentially, the subnav will be automatically populated with relevant items, and I was wondering if it is possible to scroll along the subnav using jQuery?

jCarousel appears to do what I want (scroll horizontally), however my subnav is simply a bunch of href tags and seperators within a span class, e.g.:

<ul id="topnav">
        <li><a href="#" class="red">topmenu item</a>
            <span>
                <a href="#">submenu link 1</a> |
                <a href="#" class="even">submenu link 2</a> |
                <a href="#">submenu link 3</a> |
                <a href="#" class="even">submenu link 4</a> |
                <a href="#">submenu link 5</a> |
                <a href="#" class="even">submenu link 6</a> |
                <a href="#">submenu link 7</a> |
            </span>
        </li>
</ul>

Is there any way I can use jQuery开发者_StackOverflow to scroll my subnav href links, without having to convert it to a HTML to a list etc.? It would be a pain having to redo the CSS; plus my subnav is automatically outputted as href links anyway.

I simply would like to have a little arrow appear which would allow users to click and scroll to the right if/when the links overflowed. Is this possible without having to change the HTML I already have?

Thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜