2011-10-29 26 views
2

我正在嘗試創建一個從Picasa滾動動態項目的工具。 Picasa允許使用嵌套文件選項,這意味着當用戶瀏覽文件系統時,新項目會一遍又一遍地被加載。Picasa嵌入圖庫+自定義jQuery UI滑塊

我想在必要時爲此div創建自定義滾動條。 我發現有人正在爲我想要做的工作版本,但無法讓它適應我的情況。 基本上我需要檢查滾動條的功能,每次加載新內容或單擊某個特定元素時。

如果有人能幫我整合這個插件,我將非常感激。 插件是非常有據可查的,但我仍然是一個jQuery noob,所以我沒有太多的運氣。

謝謝。


jQuery UI的滑塊插件: http://www.simonbattersby.com/blog/vertical-scrollbar-using-jquery-ui-slider/

嵌入Picasa中摘錄:

jQuery(document).ready(function() { 
    jQuery("#picasagallery").EmbedPicasaGallery('andreagerstmann',{ 
     loading_animation: 'css/loading.gif', 
     size: '190', 
     msg_loading_list : 'Just one moment please', 
     msg_back : 'Back' 
    }); 
}); 

進行復印:

回答

0

我這樣做了一段時間後使用:

負荷大的數據集在ASP.NET(VBASPNETInfiniteLoading)無限滾動 http://code.msdn.microsoft.com/VBASPNETInfiniteLoading-10c3f379

原創文章: http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/

工作例如: http://www.webresourcesdepot.com/dnspinger/

<link rel="stylesheet" href="Styles/Site.css" type="text/css" /> 
    <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script> 



    $(document).ready(function() { 

     function lastPostFunc() { 
      $('#divPostsLoader').html('<img src="images/bigLoader.gif">'); 

      //send a query to server side to present new content 
      $.ajax({ 
       type: "POST", 
       url: "Default.aspx/Foo", 
       data: "{}", 
       contentType: "application/json; charset=utf-8", 
       dataType: "json", 
       success: function (data) { 

        if (data != "") { 
         $('.divLoadData:last').after(data.d); 
        } 
        $('#divPostsLoader').empty(); 
       } 

      }) 
     }; 

     //When scroll down, the scroller is at the bottom with the function below and fire 
    the lastPostFunc function 
     $(window).scroll(function() { 
      if ($(window).scrollTop() == $(document).height() - $(window).height()) { 
       lastPostFunc(); 
      } 
     }); 

    });