Skip to content

Commit 8a75050

Browse files
committed
Demo
1 parent f2b7dfd commit 8a75050

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const someView = Backbone.View.extend({
2020
```
2121

2222
### Example
23-
See [test/app.js](test/app.js) for an example.
23+
See [test/app.js](test/app.js) for an example. [demo](https://thann.github.com/backbone_scrollBottom)
2424

2525
Run test server with `npm run test` then navigate to [localhost:3069](http://localhost:3069).
2626

test/app.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ const Backbone = require('backbone');
66

77
const layoutView = Backbone.View.extend({
88
el: '#app',
9-
template: `<div> blah blah </div>`,
9+
template: `
10+
<br>
11+
<h3> thann/backbone_scrollbottom demo </h3>
12+
<div> scroll to the bottom, and see more stuff appear </div>
13+
<br>
14+
`,
1015
initialize() {
1116
this._tmpl = _.template(this.template);
1217
this.initScrollBottom();
@@ -22,7 +27,7 @@ const layoutView = Backbone.View.extend({
2227
// Add a bunch of nonsense
2328
for (let i = 0; i <= (x||0); i++) {
2429
for (let j = 0; j < 100; j++) {
25-
this.$el.append(`<div> lame: ${i}, ${j} </div>`);
30+
this.$el.append(`<div> line: ${i}, ${j} </div>`);
2631
}
2732
}
2833
},

0 commit comments

Comments
 (0)