Waypoints.js在一页中水平和垂直

时间:2014-04-27 11:38:38

标签: javascript jquery html css jquery-waypoints

我正在用waypoints.js和skrollr.js写一个视差网站 并遇到了一个问题:

slide1应滚动正常(垂直),而slide-2应在触发后滚动水平(宽度:4000px)。但我不知道该怎么做。我知道新的waypoints.js有水平:true但我现在有点卡住了。有人有想法吗?

 <section id="slide-1">
                <div data-anchor-target="#slide-1">
                        <div class="Container">
                        <div class="Content">
                            <h2>Scroll this vertically</h2>
                        </div>
                    </div>
                </div>
 </section>
<section id="slide-2">
                <div data-anchor-target="#slide-2">
                        <div class="Container">
                        <div class="Content">
                            <h2>Scroll this horizontal</h2>
                        </div>
                    </div>
                </div>
 </section>
<section id="slide-3">
                <div data-anchor-target="#slide-3">
                        <div class="Container">
                        <div class="Content">
                            <h2>Scroll this vertically again</h2>
                        </div>
                    </div>
                </div>
 </section>

可能是这样的:

$('#slide-2').waypoint(function() {

//toogle #slide-2 width:4000px  scroll horizontal:true etc.

;});

0 个答案:

没有答案