Skip to content

Commit

Permalink
renamed public method setup to 'scroll', and added private method '_s…
Browse files Browse the repository at this point in the history
…etup' to behavior extensibility
  • Loading branch information
lukeshumard committed Jun 17, 2011
1 parent ba63a4c commit d3ab737
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
26 changes: 17 additions & 9 deletions jquery.infinitescroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
} else {

(this.options.binder)[binding]('smartscroll.infscr.' + instance.options.infid, function () {
instance.setup();
instance.scroll();
});

};
Expand Down Expand Up @@ -129,12 +129,7 @@
// FIX
opts.callback = callback || function () { };

// Setup binding
// if extended, do that
// else, do this
if (!opts.behavior) {
this._binding('bind');
}
this._setup();

},

Expand Down Expand Up @@ -330,6 +325,19 @@

},

_setup: function infscr_setup() {

var opts = this.options;

// Setup binding
// if extended, do that
// else, do this
if (!opts.behavior) {
this._binding('bind');
}

},

// Show done message
_showdonemsg: function infscr_showdonemsg() {

Expand Down Expand Up @@ -466,8 +474,8 @@

},

// Check to see height left to fire - rename this!!!!
setup: function infscr_setup() {
// Check to see next page is needed
scroll: function infscr_scroll() {

var opts = this.options;

Expand Down
1 change: 1 addition & 0 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h3>Debug bar</h3>
<a href="#" rel="pause">Pause</a>
<a href="#" rel="resume">Resume</a>
<a href="#" rel="toggle">Toggle</a>
<a href="#" rel="scroll">Scroll</a>
<a href="#" rel="unbind">Unbind</span></a>
<a href="#" rel="bind">Bind</span></a>
<a href="#" rel="retrieve">Retrieve</a>
Expand Down

0 comments on commit d3ab737

Please sign in to comment.