Skip to content

Commit

Permalink
Merge pull request #56 from karataserkan/patch-1
Browse files Browse the repository at this point in the history
$next selector option
  • Loading branch information
kop committed Mar 28, 2016
2 parents 2ad6a22 + d6f873d commit acb7685
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ScrollPager.php
Expand Up @@ -73,6 +73,13 @@ class ScrollPager extends Widget
* Make sure the elements are inside the container element.
*/
public $item = '.item';

/**
* @var string $next Enter the selector of the link element that links to the next page.
* The href attribute of this element will be used to get the items from the next page.
* Make sure there is only one(1) element that matches the selector.
*/
public $next = '.next a';

/**
* @var int $delay Minimal number of milliseconds to stay in a loading state.
Expand Down Expand Up @@ -267,7 +274,7 @@ public function run()
'container' => $this->container,
'item' => $this->item,
'pagination' => "{$this->container} .pagination",
'next' => '.next a',
'next' => $this->next,
'delay' => $this->delay,
'negativeMargin' => $this->negativeMargin
]);
Expand Down Expand Up @@ -436,4 +443,4 @@ protected function checkEnabledExtensions($extensions)
return (count(array_intersect($this->enabledExtensions, $extensions)) == count($extensions));
}
}
}
}

0 comments on commit acb7685

Please sign in to comment.