Adding ajax pagination

isset($displayData['range']) && ((int) $displayData['range']) > 0 is a wrong way to check it, you can just use 
!empty($displayData['range'])