2011-10-29 43 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(); 
      } 
     }); 

    });