I'm loading AJAX content that contains a javascript function inside the AJAX content. I'm using the jQuery .load function and calling done() on completion.
$('#content').load(a, done);
function done()
{
    if(pagejs() == 'function')
    {
        pagejs();
    }
}
I'm not able to get the function to execute in IE 9 but in FF and Chrome the script is executed fine. In IE, I'm getting a SCRIPT5007: Object expected error on the if(pagejs() == 'function') line. 
I added the compatibility meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=8"  /> still with no success. 
Here is a sample of the AJAX content:
<div id="about"><h1>About This Website</h1>
<script type="text/javascript">
function pagejs(){alert('content was loaded from dynamic script');}
</script>
<p>This is test AJAX content</p>
In IE, the pagejs(); is undefined. Can someone please tell me how I can get IE to recognize开发者_Python百科 this script? Thank you.
pagejs() == 'function'
That executes pagejs and compares it's return value to the string function.
You want typeof pagejs === 'function'
Try if(typeof(pagejs) == 'function')
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论