Tyler
Tyler

Reputation: 2386

Including jquery ui

I am trying to use jquery ui and I'm not sure why it isn't working heres the include I used

<script type="text/javascript" src="http://360eye.com/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js"></script>

<script type="text/javascript" src="http://360eye.com/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js"></script>

<link rel="stylesheet" type="text/css" href="http://360eye.com/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.css" />

<link rel="stylesheet" type="text/css" href="http://360eye.com/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.min.css" />

  <script>
           $(function() {
    $( "#tabs" ).tabs();
  });
  </script>

Also here is the code I used to make the tabs (I deleted the placeholder text so it's not too long)

<div id="tabs">
  <ul>
    <li><a href="#tabs-1">Nunc tincidunt</a></li>
    <li><a href="#tabs-2">Proin dolor</a></li>
    <li><a href="#tabs-3">Aenean lacinia</a></li>
  </ul>
  <div id="tabs-1">

  </div>
  <div id="tabs-2">

  </div>
  <div id="tabs-3">

  </div>
</div>

I'm not sure how to tell but I think maybe one of my includes isn't working properly. How can I tell if a file is included correctly? What else could be wrong with my code? Is wordpress maybe interfering with this?

Upvotes: 0

Views: 173

Answers (2)

hammus
hammus

Reputation: 2612

Its not working because jQuery UI uses the jQuery Library which you havent included:

<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://360eye.com/jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.min.js"></script>

NOTE: Must be included before the ui library.

Upvotes: 3

Milind Anantwar
Milind Anantwar

Reputation: 82241

You need to include the jquery library as well:

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

Demo

Upvotes: 3

Related Questions