Picasa嵌入了Gallery + Custom jQuery UI滑块

时间:2011-10-29 03:09:58

标签: jquery jquery-ui scroll gallery picasa

我正在尝试创建一个从Picasa滚动动态项目的工具。 Picasa允许嵌套文件选项,这意味着当用户浏览文件系统时,一遍又一遍地加载新项目。

我想在必要时为此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'
    });
});

进行中复制: http://andreagerstmann.com/gallery.html

2 个答案:

答案 0 :(得分:0)

帕特里克

滑块的这个变体是否能满足您的需求:

http://www.simonbattersby.com/demos/vertical_scrollbar_demo_7_addcontent.htm

在此变体中,滑块代码包含在setSlider()函数中 - 因此您只需在Picasa代码完成后调用此函数。

西蒙

答案 1 :(得分: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();
           }
       });

    });