jQuery script references
<p>when I write this code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
        function showhide(master, detail) {
            var src = $(master).children()[0].src;
            if (src.endsWith("plus.png"))
                src = src.replace('plus.png', 'minus.png');
            else
                src = src.replace('minus.png', 'plus.png');

            $(master).children()[0].src = src;

            $(detail).slideToggle("normal");
        }
&lt;/script&gt;
</code></pre>

<p>and reference jQuery library in ScriptManager:</p>

<pre><code>&lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
    &lt;Scripts&gt;
        &lt;asp:ScriptReference Path="~/scripts/jquery-1.4.1.min.js" ScriptMode="Release" /&gt;
    &lt;/Scripts&gt;
&lt;/asp:ScriptManager&gt;
</code></pre>

<p>every thing is ok.but when I commnet above code and reference jQuery In head part:</p>

<pre><code>&lt;script src="scripts/jquery-1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
</code></pre>

<p>debugger alert me that for <code>endsWith</code> : <code>Object doesn't support this property or method</code></p>

<p>why asp.net has this behaivior?</p>

<p>thanks</p>
