goTOP
August 19, 2012

Scroll Follow 板塊位置漸進跟隨

| |
網頁語言 » jQuery | 閱覽(5696) | Posted by apao at 14:24
點擊在新視窗中瀏覽此圖片

於head間置放:
<script type="text/javascript" src="{js}/jquery.js"></script>
<script type="text/javascript" src="{js}/ui.core.js"></script>
<script type="text/javascript" src="{js}/jquery.scroll-follow.js"></script>
<script type="text/javascript">
$( document ).ready( function (){
  $('#sideBar').scrollFollow({});
});

//option
$( document ).ready( function () {
  $( '#sideBar' ).scrollFollow( {
    speed: 2000,
    offset: 0,
    killSwitch: 'exampleLink',
    onText: 'Disable Follow',
    offText: 'Enable Follow'
  } );
} );
</script>


※speed: 2000,(速度)
※offset: 0,(top位置)

Requirements (必備零件)
    jQuery (tested with 1.2.6)
    jQuery UI Core (tested with 1.5.2)

Optional (追加零件)
    jQuery Easing Plugin
    jQuery Cookie Plugin

DEMO:
http://blog.apao.idv.tw/sample/ScrollFollow/index.html

出處:
http://kitchen.net-perspective.com/open-source/scroll-follow/
Facebook twitter LINEk
文章来自: 本站原創
Tags: ,
0 Comment(s)
我要發表評論
暱稱
密碼 [ 訪客無需密碼 ]
電郵
網址
開啟HTML 開啟UBB 開啟表情 隱藏 記住我