English 中文(简体)
Horizon平地滚动点。 单一单元Jumps?
原标题:Horizontal scrolling site with jquery. Single Cell Jumps?
  • 时间:2010-07-06 16:34:19
  •  标签:
  • jquery

Am trying to build a site that is a horizontal scrolling website. When I click a hash(#) link it should scroll to that part.

我可以做很多工作,但我只是想这样做,这样,如果我点击一个环节,它只会把一个囚室隔开。 展示你的好例子如下:

它对左边被点击的人有什么关系,只能把一个囚室而不是3个或4个。

感谢你们的帮助,

Pad

问题回答

对我来说,它喜欢每点击通过AJAX装载内容。 因此,可能发生的情况是,在目前内容四分五裂之前或之后添加一个内容,然后逐渐达到这一目的。

传真

<div id="container">
    <div id="current">... content...</div>
</div>

Java

$( id ).click(function() {
    // ... get content via ajax

    var cur = document.getElementById( current );
    var prev = document.createElement( div );

    prev.inner传真 =  content ;
    prev.marginLeft =  -600px ; // or whatever width is needed        

    $(prev).insertBefore($(cur)).animate({ margin-left :  0 }, 2000);
    $(cur).attr( id ,   ).remove;
    $(prev).attr( id ,  current );

    $(cur).remove();
});

这支手只剩下雕刻,但很难加以修改,以便你能够根据链接指数,以两种方式发展。

掌握的主要概念是人力部的操纵。 如果你想要开车,就在目前要素之前插入一个要素,从负差到0。 如果你想放弃权利,在目前要素之后插入一个要素,并在现要素后插入一个要素:现要素,从0到负值。 确保你在把屏幕移出后删除这些内容,以节省记忆,而且你们都应被搁置。





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签