Q:

jQuery code at Drupal page not working in IE?

I've tried coming up with a solution as to why the following jQuery script does not work. It works in all other browsers but IE? 
I've done a script (see below) which has been added inside a drupal page.
    <script>

    (function ($) {

    $.get("showinfo.php", function (data) { 
       data = '"' + data + '"';    
       $("#siteloader").html(data);
       var newHTML = $('#siteloader').html();
       $('#siteloader').html(newHTML.substr(1,newHTML.length-2));
       var scrollHeightData = $('#siteloader').height();
       $('#siteloader').css("height", scrollHeightData);
    });  

    }(jQuery));

    </script>
    <div id="siteloader"></div>

Tried the following, which also works in other browsers:
    $.get('showinfo.php', null, function(html) {
       $('#siteloader').replaceWith(html);
       $('#siteloader').html(html);
       var scrollHeightData = $('#siteloader').height();
       $('#siteloader').css("height", scrollHeightData);
    });

Do you know if this can be done so it works in IE?
Thanks in advance.

A:

I have no access to test your code in IE. But there's what looks like a typo in your code on the last line in your javascript code.
It should be a self-calling function, so the part (jQuery) should go after the closing bracket.
<script>
(function ($) {

$.get("showinfo.php", function (data) { 
   data = '"' + data + '"';    
   $("#siteloader").html(data);
   var newHTML = $('#siteloader').html();
   $('#siteloader').html(newHTML.substr(1,newHTML.length-2));
   var scrollHeightData = $('#siteloader').height();
   $('#siteloader').css("height", scrollHeightData);
});  

})(jQuery); // instead of "}(jQuery));"
</script>

