Reputation: 51064
I'm trying to include jQuery in an ASP.NET web site that also uses DexExpress controls, but no matter how I include my script, the $
function is always anonymous
and the jQuery
function is undefined. I suspect the DevExpress 'plumbing' script is overriding jQuery.
Anything I should be looking at?
Upvotes: 2
Views: 3973
Reputation: 51064
The problem here was URL resolution for scripts, not a conflict. Using data binding expressions instead of code render blocks solved this issue. Excerpts from my master page:
<head id="Head1" runat="server">
<title>Smart Computer Solutions</title>
<script src="<%# ResolveUrl("~/Scripts/jquery-1.4.4.js")%>" type="text/javascript"></script>
</head>
And code-behind:
protected void Page_Load(object sender, EventArgs e)
{
Page.Header.DataBind();
}
Upvotes: 2
Reputation:
Have you tried using JQuery.noConflict()? This allows you to move JQuery to something other than the $ variable and resolves conflicts like this one.
Upvotes: 0