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

[Solved] .Telerik().ScriptRegistrar() make jquery UI error

5 Answers 165 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.
sabbir
Top achievements
Rank 1
sabbir asked on 19 Jul 2011, 10:22 AM
I am New in MVC,working on MVC2.I made up four or five pages.I have a page named ItemPurchase.aspx which has the following script tag..
    <script src="<%=ResolveUrl("~/Scripts/jquery-1.4.1.js")%>" type="text/javascript"></script>
   <script src="<%=ResolveUrl("~/Scripts/jquery-1.4.1.min.js")%>" type="text/javascript"></script>
   <script src="<%=ResolveUrl("~/Scripts/jquery-ui-1.8.11.custom.min.js")%>" type="text/javascript"></script>
   <script src="<%=ResolveUrl("~/Scripts/jquery.validate.min.js")%>" type="text/javascript"></script>
   <script src="<%=ResolveUrl("~/Scripts/Purchase.js")%>" type="text/javascript"></script>

In the Purchase.js ,Jquery UI like calender,Jquery Validation has been added.Purchase.js is working properly.
 The pages are working properly.But today when i add Telerik api i get the problem.Purchase.js and other .js files are not working
properly.when i add the following line in master page the pages are are not working.The line is
    <%= Html.Telerik().ScriptRegistrar()%>
</body>
Error.-$("#accordion").accordion is not a function.
what is the problem?it cannot recognize Jquery  $("#accordion").accordion() function.
i want to use both Telerik control and want to keep existing jQuery functionality.Please help me

5 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 19 Jul 2011, 11:39 AM
Hi Sabbir,

Most probably you need to disable the jQuery, which is automatically registered by the ScriptRegistrar:

http://www.telerik.com/help/aspnet-mvc/web-assets-working-with-javascript-web-assets.html#jQuery

Note that a given version of the Telerik MVC extensions work best with a specific version of jQuery.

All the best,
Dimo
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
sabbir
Top achievements
Rank 1
answered on 19 Jul 2011, 02:51 PM
Thanks for your reply.Actually i want to keep my existing Jquery UI and want to use Telerik UI.if i write the following line
<%= Html.Telerik().ScriptRegistrar().jQueryValidation(false)%> ,telerik is not working.
Please leave a better specific solution.
0
Dimo
Telerik team
answered on 19 Jul 2011, 03:48 PM
Hi Sabbir,

I didn't say anything about the jQuery Validation. You need to set  jQuery(false).

Also, pay special attention to my second note - the latest Telerik MVC extensions work best with jQuery 1.5.1.

Best wishes,
Dimo
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
sabbir
Top achievements
Rank 1
answered on 19 Jul 2011, 05:20 PM
Thnaks for ur reply.I have added jquery-1.5.1.min.js but no result.
if i add Html.Telerik().ScriptRegistrar().jQuery(false) then Telerik().PanelBar() is not working .and if i add Html.Telerik().ScriptRegistrar() then my Jquery Ui not working.I need to work both...
0
Atanas Korchev
Telerik team
answered on 19 Jul 2011, 07:29 PM
Hi Sabbir,

 This is the recommended solution. We need more info about what is currently failing when you include manually jquery 1.5.1 and use jQuery(false). Please paste here how your view looks like now.

Regards,
Atanas Korchev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
sabbir
Top achievements
Rank 1
Answers by
Dimo
Telerik team
sabbir
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or