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

[Solved] ScriptRegistrar

0 Answers 141 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.
MICHAEL
Top achievements
Rank 1
MICHAEL asked on 05 Oct 2012, 11:20 AM

Hello,

I am having a prolbem, I want to register my "~/Scripts/jquery-1.4.4.js" script in the ScriptRegistrar, but i keep getting the following error:

Microsoft JScript runtime error: Object doesn't support property or method 'tMenu'

on this line:
jQuery('#Menu').tMenu();});

My ScriptRegistrar is located in my site.master file.

So, to overcome this error, I have to put the following in each of my aspx pages:

<script src="<%= Url.Content("~/Scripts/jquery-1.4.4.js") %>" type="text/javascript"></script>

So, when I want to upgrade to the latest jquery, i'll have to go to each page. 

I was wondering if I could just use the ScriptRegistrar somehow?

This is ScriptRegistrar, is there anything wrong?

<%= Html.Telerik().ScriptRegistrar().Scripts(scripts =>
            scripts.AddGroup("CommonScript", group => group
                        .Add("~/Scripts/jquery.form.js")
                        .Add("~/Scripts/MicrosoftAjax.js")
                        .Add("~/Scripts/MicrosoftMvcValidation.js")
                        .Add("~/Scripts/jquery.poshytip.js")
                        .Add("~/Scripts/jquery-1.4.4.js")
                     .Combined(true)
                     .Compress(true)
            )
         )
%>

 

 

 

 

 

 

 

 

 

 

 

 

 

Tags
General Discussions
Asked by
MICHAEL
Top achievements
Rank 1
Share this question
or