Search code examples
javascriptjqueryajaxsupersized

ajax content not loading on ie7 and 8


it is working on all browsers but ie7 and ie8. The content dosn't seem to load into the site when we press a menu item while it does work on all major browsers, not sure if it is due to the supersised plugin (?)

I can't get my head around it and I'm kinda stack!

p.s. If it can help anyhow: I am loading the content once supersized animation has finished, you can find this at the end of supersized.shutter.min.js

Any takers please? Thanks!


Solution

  • The problem being with IE parsing the document was causing this issue. Since I am using wordpress i manage to get around the issue by calling the header and the footer with ajax.

    <?php if (!is_ajax_request()) get_header(); ?>
      -----
     <?php if (!is_ajax_request()) get_footer(); ?>
    

    in my function.php i have:

     function is_ajax_request() {
      return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&            strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
     }
    

    Done :)