Hi,
I don't think you are understanding what I am trying to do.
I have my jQuery file in a different directory as to what comes default with Visual Studio. The reason for this is because I have downloaded the latest version of jQuery jquery-1.6.2.min.js. I have my Telerik MVC content and scripts directories in a different directory. As to what I have seen the Telerik scripts needs the jQuery file to be loaded first. I have deleted the content and scripts directories that come by default with an ASP.NET MVC application.
Telerik scripts directory:
~/Assets/telerikaspnetmvc/2011.2.712/Scripts/
My jQuery directory:
~/Assets/JavaScripts/jQuery/
I changed the ScriptRegistrar (as to your recommendation) to that of below:
@(Html.Telerik().ScriptRegistrar()
.DefaultGroup(group => group
.DefaultPath("~/Assets/telerikaspnetmvc/2011.2.712/Scripts/")
.Compress(true)
)
.Scripts(scripts => scripts
.AddGroup("JavaScriptAssetLocation", group => group
.DefaultPath("~/Assets/JavaScripts/jQuery/")
.Add("jquery-1.6.2.min.js")
.Compress(true)
)
)
.jQuery(false)
)
This gave me an error. I swapped the 2 around so that it can read jQuery first as such but it still seems to load the default Telerik JavaScript files first. This is the changed code:
@(Html.Telerik().ScriptRegistrar()
.Scripts(scripts => scripts
.AddGroup("JavaScriptAssetLocation", group => group
.DefaultPath("~/Assets/JavaScripts/jQuery/")
.Add("jquery-1.6.2.min.js")
.Compress(true)
)
)
.DefaultGroup(group => group
.DefaultPath("~/Assets/telerikaspnetmvc/2011.2.712/Scripts/")
.Compress(true)
)
.jQuery(false)
)
What am I doing wrong here? Please provide code samples as to how it must be done.