This is a migrated thread and some comments may be shown as answers.

[Solved] Add jquery pluguin to html extension

4 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jose Granja
Top achievements
Rank 1
Jose Granja asked on 15 Feb 2010, 04:10 PM
Hi,

I register the MVC.net extensions and I'm using the jquery that comes shipped with! It's been working really nice since but now I found some useful jquery pluguin that I might want to add to me web project! I try to add them by the Html.Telerik().ScriptRegistrar().Scripts but I didin't manage to do it.

Can somebody give me an advice about the steps that I should take in order to add any jquery pluguin? I'm very interested in adding jquery ui and adding the tooltip pluguin.

I've been struggling with this for a while and my main problem is that I'm a beginner with JQuery.

many thanks,

jose


4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Feb 2010, 05:23 PM
Hello Jose Granja,

I suggest you check this help article.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jose Granja
Top achievements
Rank 1
answered on 16 Feb 2010, 04:38 PM
Hi,

thanks for the advice. I supose I want to use this:

By default the jQuery script is always included when you use the ScriptRegistrar. It is included in the so called "default" web asset group. You can add files to that group too if you wish to later combine them with the jQuery JavaScript. Here is how:
CopyC#
<%    Html.Telerik().ScriptRegistrar().Scripts(scripts=>            scripts.DefaultGroup(group =>                 group.Add("~/Scripts/Core.js")                     .Add("~/Scripts/Stuff.js")            )         )        .Render();%>
but when I try to use it I get the following error:
'Telerik.Web.Mvc.UI.WebAssetItemCollectionBuilder' does not contain a definition for 'DefaultGroup' and no extension method 'DefaultGroup' accepting a first argument of type 'Telerik.Web.Mvc.UI.WebAssetItemCollectionBuilder' could be found (are you missing a using directive or an assembly  
any ideas what might be happening??
thank you for the help,
jose
0
Accepted
Atanas Korchev
Telerik team
answered on 16 Feb 2010, 04:49 PM
Hello Jose Granja,

Indeed there is no DefaultGroup method (this appears to be a bug in the documentation). To use the default group modify your code like this:

Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Add("file.js"))

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jose Granja
Top achievements
Rank 1
answered on 16 Feb 2010, 04:53 PM
wow! that was quick!! thank you very much!
Tags
General Discussions
Asked by
Jose Granja
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Jose Granja
Top achievements
Rank 1
Share this question
or