diff --git a/src/AutoPaginateBlade.php b/src/AutoPaginateBlade.php index 758d91f..ae6bf25 100644 --- a/src/AutoPaginateBlade.php +++ b/src/AutoPaginateBlade.php @@ -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 = '