English 中文(简体)
参考选择
原标题:Reference jQuery plugin options

我是使用静态电压碎块的,我想提及我版本的电 lo变量。 开办职能:

        var rDealBone = this;
        ($( .deals-list ), this.el).infinitescroll({
            navSelector  : "div.navigation",
            nextSelector : "div.navigation a",
            itemSelector : ".deal",
            debug: true,
            loading: {
                finished: undefined,
                finishedMsg: "<em>Congratulations, you ve reached the end of the internet.</em>",
                img: "http://www.infinite-scroll.com/loading.gif",
                msg: null,
                msgText: "<em>Loading the next set of posts...</em>",
                selector: null,
                speed:  fast ,
                start: function(){ 
                    // this is the code from the default start function of the plugin,
                    // the opts refers to the plugin options cariable, how can i refere to it
                    // from this function
                    $(opts.navSelector).hide();
                        opts.loading.msg
                            .appendTo(opts.loading.selector)
                            .show(opts.loading.speed, function () {
                                rDealBone.showMore();
                        });

                }
            },
            pathParse: function(){
                return  /listDeals/offset:  + rDealBone.doffset;
            }
        });

我怎么能从开办职能中提一下原始选择?

感谢Yehia的帮助。

最佳回答

看看我,你们能否通过第一段接触:

opts.loading.start.call($(opts.contentSelector)[0],opts);

因此:

start: function (opts) { console.log(opts);  }

我在这样做之前没有使用这一gin子,我没有亲自审判。

问题回答

暂无回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签