Chetana Kestikar
Chetana Kestikar

Reputation: 570

Infinite scroll built using knockout js not working in IE9

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

Answers (1)

Chetana Kestikar
Chetana Kestikar

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

Related Questions