开发者

How to make a link - link to a DIV?

I have a carousel for a Tumblr blog and there are separate DIVs for each blog post, but there is also a DIV for info like name/description etc.. How would I make a button that slid to that DI开发者_运维知识库V when clicked? The layout is here and the one that would be the description has a "2" next to the text. Thanks in advance :)


If you give the div an id, then you can use the id value as an anchor, so

<div id="foo">something</div>

coupled with

<a href="#foo">click me</a>

should do what you want.


Check out jQuery Slide To


they are called anchors :

<a href="#anchorName">go to div</div>
<a name="anchorName">Example<a>

of course having it gradually move down to a point can be achieved with moveto in javascript

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜