Skip to content

Commit 8d3fdac

Browse files
committed
Code style improvements
1 parent 62f5c2b commit 8d3fdac

15 files changed

+11
-58
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Infinite Ajax Scroll
1+
Infinite AJAX Scroll
22
====================
33

44
A jQuery plugin to turn your paginated pages into infinite scrolling pages with ease.

test/00-callbacks-test.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
buster.spec.expose();
2-
var expect = buster.assertions.expect;
3-
41
describe("Callbacks", function () {
52
before(function() {
63
this.timeout = 10000;
@@ -73,8 +70,8 @@ describe("Callbacks", function () {
7370
spy1 = function() { lastedCalledSpy = "spy1"; },
7471
spy2 = function() { lastedCalledSpy = "spy2"; };
7572

76-
callbacks.add(spy1, 1000); // lowest prio, get's called last
77-
callbacks.add(spy2, 2000); // highest prio, get's called first
73+
callbacks.add(spy1, 1000); // lowest priority, gets called last
74+
callbacks.add(spy2, 2000); // highest priority, gets called first
7875

7976
callbacks.fireWith(this, ['arg1']);
8077

test/01-scroll-test.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
buster.spec.expose();
2-
var expect = buster.assertions.expect;
3-
var when = buster.when;
4-
5-
61
describe("IAS", function () {
72
before(function() {
83
this.timeout = 10000;
@@ -82,6 +77,8 @@ describe("IAS", function () {
8277
expect($('#post11').length).toEqual(1);
8378
expect($('#post21').length).toEqual(0);
8479

80+
$element.ias('destroy');
81+
8582
deferred.resolve();
8683
});
8784
});

test/03-extensions-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ describe("IAS", function () {
6363
it("extension can add listeners", function() {
6464
var anExtension = function() {
6565
this.listeners = {
66-
test: jQuery.Callbacks()
66+
test: new IASCallbacks()
6767
};
6868
};
6969

7070
anExtension.prototype.bind = function(ias) {
7171
jQuery.extend(ias.listeners, this.listeners);
7272
};
7373

74-
// when the extension isnt bound, this will throw an error
74+
// when the extension isn't bound, this will throw an error
7575
expect(
7676
function () {
7777
jQuery.ias().on('test', function () {

test/04-history-extension-test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
buster.spec.expose();
2-
31
describe("IAS", function () {
42
before(function() {
53
this.timeout = 10000;
@@ -47,7 +45,7 @@ describe("IAS", function () {
4745
}));
4846

4947
// ias auto-loads the prev page when initialized,
50-
// this prevents the autoloading
48+
// this prevents the auto loading
5149
var firstTime = true;
5250
ias.on('prev', function () {
5351
if (firstTime) {

test/04-paging-extension-test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
buster.spec.expose();
2-
31
describe("IAS", function () {
42
before(function() {
53
this.timeout = 10000;

test/04-spinner-extension-test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
buster.spec.expose();
2-
31
describe("IAS", function () {
42
before(function() {
53
this.timeout = 3000;

test/04-trigger-extension-test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
buster.spec.expose();
2-
31
describe("IAS", function () {
42
before(function() {
53
this.timeout = 10000;

test/05-loading-test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
buster.spec.expose();
2-
31
describe("IAS", function () {
42
before(function() {
53
this.timeout = 10000;

test/fixtures/framed.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
55
<title>Framed</title>
6-
7-
<!--<link rel="stylesheet" type="text/css" href="css/jquery.ias.css" />-->
86
</head>
97
<body>
108
<div id="content" style="height: 300px; width: 500px; overflow: scroll;">

0 commit comments

Comments
 (0)