Reputation: 570
I got a code snippet for infinite scrolling from this : link.
I just changed the ajax url to echojson.php
from /echo/json/
.
This code works fine on chrome and firefox. But, its not working on IE 9.
File echojson.php contains:
<?php
$json=array();
for($i=1;$i<=20;$i++){
$json[]='<div></div>';
}
echo json_encode($json);
?>
I am unable to understand why is it happening in case of IE9. Please help me fix it.
Upvotes: 1
Views: 210
Reputation: 570
Solved the problem!
IE could not find JSON.stringify(). So, I just added the script as
<script src="//cdnjs.cloudflare.com/ajax/libs/json2/20121008/json2.js"></script>
.
Now it works flawlessly...
Upvotes: 1