user1558572
user1558572

Reputation: 28

jQuery tabs are all displaying open

I've been trying to figure this out for a few days now, but still I can't figure out what is wrong. I had this working fine on my desktop, but can't get it to work live. I've checked the paths and those seem to be fine. For some reason the jQuery tabs section are all showing at once. Also, the colorbox isn't working.

I'm getting errors from Colorbox stating that the function is not defined

I'm getting an error from jquery-1.11.0.min.js.2 which I'm not quite sure what the error is here.

Uncaught TypeError: undefined is not a function Colorbox.js:6
(anonymous function) Colorbox.js:6
j jquery-1.11.0.min.js:2
k.fireWith jquery-1.11.0.min.js:2
n.extend.ready jquery-1.11.0.min.js:2
K

I'm also getting an error related to the admin-bar.min.jv?ver=3.9.3:1 and jquery.min.js?ver=3.9.1:29

Uncaught TypeError: undefined is not a function admin-bar.min.js?ver=3.9.1:1
a.fn.hoverIntent admin-bar.min.js?ver=3.9.1:1
(anonymous function) admin-bar.min.js?ver=3.9.1:1
b.extend.ready jquery.min.js?ver=3.9.1:29 & :37
u

I added this link to my local file and sure enough it broke my page locally in the same way.

<script type='text/javascript'        src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=3.9.1'></script>

Any help would be appreciated because I don't know what to try and do to fix these errors. I've looked through my wordpress templates and the header, but I can't find where this link is coming from. I'm wondering if Wordpress or another plugin is inserting it??

Upvotes: 0

Views: 893

Answers (1)

APAD1
APAD1

Reputation: 13666

Expanding on my comment above, here are the ways around the jQuery no conflict mode.

You can use the word jQuery in place of $ like this:

jQuery(document).ready(function() {
    alert("Using jQuery in place of $");
});

You can reassign the shortcut in the wrapper like this:

jQuery(document).ready(function($) {
    $('.content').html('Using $ WITHIN your function will now work')
});

Finally, you can set up a new shortcut through a variable like this:

var $j = jQuery;    
$j(document).ready(function() {
    $j('.content').html('Using $j will now work in place of $')
});

Upvotes: 1

Related Questions