开发者

How can I make this menu effect with jQuery? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
开发者_如何学JAVA

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

Improve this question

I've seen this menu effect on many sites but I don't know if there were a plugin/tutorial to make some thing like this ? see this example: http://www.elegantthemes.com/preview/TheProfessional/


A quick look at the source for the example you gave shows it is using Superfish.

The good thing about the web is everything is open. Find something you like (you've got that already), then look at the source and figure out how they are doing it. Tools like Firebug will help you.


Lava Lamp is your answer.

However, you can find some other cool jquery animated menu plugin here: 36-eye-catching-jquery-navigation-menus


I think you want the LavaLamp JQuery plugin.


First you absolutely or relatively position the menu div.

There are two childs to the menu div: one is a div of the text items (let's call it Text), and the other is a div of the animated chasing element (let's call it Chaser).

Set the Chaser to be absolutely positioned and the Text to be relatively positioned.

Set the Text to have a higher z-index than the chaser.

For each text element, use jquery to bind a hover callback to it.

That hover callback says "find the offset of the element that is being hovered over; tell Chaser to animate its position to match that offset".

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜