Object expected error in IE
<p>I have four php pages:</p>

<ol>
<li><code>header.php</code></li>
<li><code>demo1.php</code></li>
<li><code>demo2.php</code></li>
<li><code>demo3.php</code></li>
</ol>

<p>I am including <code>header.php</code> in every page i.e <code>demo1.php</code>, <code>demo2.php</code> and <code>demo3.php</code>. I included common JavaScript required for <code>demo1.php</code>, <code>demo2.php</code> and <code>demo3.php</code> in <code>header.php</code>.</p>

<p><code>header.php</code> code:</p>

<pre><code>&lt;script type="text/javascript" src="jscript/jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" language="javascript"&gt;
$(function(){
     $("#btn1").click(function(){
       console.log("btn1 clicked");
      });
     $("#btn2").click(function(){
      console.log("btn2 clicked");
     });

});
&lt;/script&gt;
</code></pre>

<p><code>btn1</code> and <code>btn2</code> elements are not declared in <code>header.php</code>, but they are declared in included pages like <code>demo1.php</code>, <code>demo2.php</code> and <code>demo3.php</code>.</p>

<p><code>demo1.php</code> code:</p>

<pre><code> &lt;?php include "header.php";?&gt;
 &lt;input type="button" id="btn1" value="check"/&gt;
 &lt;input type="button" id="btn2" value="check"/&gt;
</code></pre>

<p>This <code>demo1.php</code> page works in all browsers except in IE.</p>

<p>In IE it showing error <strong>Object expected</strong> at <code>$("btn1").click(function(){});</code>.</p>

<p>Can any one help me achieving this problem?       </p>
