Hi Telerik,
I am struggling with an unrelated issue, but was exploring my options, and noted something quirky. I wanted to try executing a function on document ready. As such, I did this:
with my script declarations as such:
I would like to keep my scripts combined. They should be combined. Loading scripts not combined is inefficient. Yet, when I have my jQuery scripts declared inside of CompositeScripts I am told
If I move all my script declarations such that the declaration is like this:
Presto! The error disappears.
Is there a good way to avoid this...? Could I have an explanation of what's going on so that I may fully understand the problem?
Thanks.
I am struggling with an unrelated issue, but was exploring my options, and noted something quirky. I wanted to try executing a function on document ready. As such, I did this:
$(document).ready(function () { FixSplitter($find(rightPaneID)); });with my script declarations as such:
<telerik:RadScriptManager ID="ScriptManager1" Runat="Server" EnablePageMethods="True" > <CompositeScript> <Scripts>
<asp:ScriptReference Path="~/Scripts/jquery-1.3.2.min.js" />
<asp:ScriptReference Path="~/Scripts/jquery.json-2.2.min.js" /> <asp:ScriptReference Path="~/Scripts/jquery-ui-1.7.2.custom.min.js" /> <asp:ScriptReference Path="~/Scripts/Dashboard/Dashboard.js" /> <asp:ScriptReference Path="~/Scripts/jquery.cookies.min.js" /> <asp:ScriptReference Path="~/Scripts/jquery.hotkeys-0.7.9.js" /> <asp:ScriptReference Path="~/Scripts/jquery.updnWatermark.js" /> <asp:ScriptReference Path="~/Scripts/Master.js" /> </Scripts> </CompositeScript> <Scripts> <asp:ScriptReference Name="Telerik.Web.UI.Common.Core.js" Assembly="Telerik.Web.UI" /> </Scripts></telerik:RadScriptManager>I would like to keep my scripts combined. They should be combined. Loading scripts not combined is inefficient. Yet, when I have my jQuery scripts declared inside of CompositeScripts I am told
Uncaught TypeError: Property '$' of object [object DOMWindow] is not a functionIf I move all my script declarations such that the declaration is like this:
<telerik:RadScriptManager ID="ScriptManager1" Runat="Server" EnablePageMethods="True" > <CompositeScript> <Scripts> </Scripts> </CompositeScript> <Scripts>
<asp:ScriptReference Path="~/Scripts/jquery-1.3.2.min.js" />
<asp:ScriptReference Path="~/Scripts/jquery.json-2.2.min.js" /> <asp:ScriptReference Path="~/Scripts/jquery-ui-1.7.2.custom.min.js" /> <asp:ScriptReference Path="~/Scripts/Dashboard/Dashboard.js" /> <asp:ScriptReference Path="~/Scripts/jquery.cookies.min.js" /> <asp:ScriptReference Path="~/Scripts/jquery.hotkeys-0.7.9.js" /> <asp:ScriptReference Path="~/Scripts/jquery.updnWatermark.js" /> <asp:ScriptReference Path="~/Scripts/Master.js" /> <asp:ScriptReference Name="Telerik.Web.UI.Common.Core.js" Assembly="Telerik.Web.UI" /> </Scripts></telerik:RadScriptManager>Presto! The error disappears.
Is there a good way to avoid this...? Could I have an explanation of what's going on so that I may fully understand the problem?
Thanks.