Why won't jquery-ui library load into my web page?

Posted on 2014-07-27
Last Modified: 2014-07-27

I have an application.
The application uses the standard template out of the box (with master page & content).

The application uses the AjaxControlToolkit TabContainer control.
I also make use of the jquery.js and jquery-ui libraries.

I'm running into some weird issues with the combination of the AjaxControlToolkit, jquery and jquery-ui.
It all seems to be related to where the libraries get included in the aspx pages.

1) If I load the jquery and jquery-ui libraries in the default page's <asp:Content>, then the jquery-ui library
    does not load. I look in developer tools (Chrome) and there are no errors. I look at the scripts that get loaded,
    and jquery-ui does not get loaded.

Consider the following:
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" />
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" />

Open in new window

2) To try to fix this, I tried moving around where I actually load the libraries. If I load the jquery library on the master page and load the jquery-ui on my default page, then it seems that jquery-ui gets loaded. However
the jquery library seems to somehow clash with the TabContainer
<--- This is from Site.Master.aspx -->
<head id="Head1" runat="server">
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" />
    <asp:ContentPlaceHolder ID="HeadContent" runat="server">

<--- This is from default.aspx -->
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" />

Open in new window

When I do the above, the
TabContainer functions correctly, but I lose all my styles

So my question is "How/Where do I include jquery and jquery-ui so they get loaded correctly
with my web page with colliding with the AjaxControlToolkit  TabContainer?

Question by:jxbma
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

jxbma earned 0 total points
ID: 40222769
    <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" ></script>
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" ></script>

Open in new window

instead of this:
 <script type="text/javascript" src="/Scripts/jquery-2.1.1.min.js" />
    <script type="text/javascript" src="/Scripts/jquery-ui.min.js" />

Open in new window

Fixed the issue?
That took 3 hours to figure out.

Featured Post

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question