when I write this code:
<script type="text/javascript">
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");
}
</script>
and reference jQuery library in ScriptManager:
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="~/scripts/jquery-1.4.1.min.js" ScriptMode="Release" />
</Scripts>
</asp:ScriptManager>
every thing is ok.but when I commnet above code and reference jQuery In head part:
<script src="scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
debugger alert me that for endsWith
: Object doesn't support this property or method
why asp.net has this behaivior?
thanks