Link to home
Start Free TrialLog in
Avatar of solution1368
solution1368

asked on

jquery conflict

I have mvc app. it is very simple and have one view (date picker).
The issue is when I addded

 <script src="../../Scripts/jquery.js" type="text/javascript"></script>

in the _layout.cshtml. The data picker in jquery is no longer working.

And just wonder how to fix it.

Thanks

codes below

 <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>


    <link href="@Url.Content("http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/themes/redmond/jquery-ui.css")" rel="Stylesheet" type="text/css"   />

    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
Avatar of Gary
Gary
Flag of Ireland image

What is jquery.js? You say conflict - what is conflicting?
Difficult to say without seeing the generated HTML, but from what you've shown it looks like you might be including 2 different jQuery libraries: jquery-1.5.1.min.js and jquery.js. That will cause conflict.
Avatar of solution1368
solution1368

ASKER

Chris: Yes, I agree, just don't know how to fix it.
ASKER CERTIFIED SOLUTION
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You may use noconflict() method.

See docs @

http://api.jquery.com/jquery.noconflict/