Skip to content

Commit

Permalink
Update AutoPaginateBlade.php
Browse files Browse the repository at this point in the history
  • Loading branch information
maikealame authored Sep 12, 2018
1 parent 732bc41 commit ca4a283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AutoPaginateBlade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public static function async($param){
if(!is_array($selector)) $selector = [$selector];
$replace = "";
foreach($selector as $s) {
$replace .= '$("body").find("'.$s.'").each( function(k,el){
$replace .= '$(document).find("'.$s.'").each( function(k,el){
$(el).replaceWith($(data).find("'.$s.'").get(k));
});';
}
$changeUrl = isset($param[1]) ? $param[1] : true;
$r = '<script>
$(document).ready(function(){
$("body").on("click",".pagination a",function(e){
$(document).on("click",".pagination a",function(e){
e.preventDefault();
var url = $(this).attr("href");
__autoLoadAsync(url);
Expand Down

0 comments on commit ca4a283

Please sign in to comment.