Jquery tabs not working on different domain

675 Views Asked by At

I have created a site for a client with jquery tabs, on my hosting they work fine

http://auto.nathanrobjohn.com

but on his hosting it just doesn't seem to want to work

http://www.modernandclassicautos.co.uk.php53-7.dfw1-1.websitetestlink.com/

I haven't changed anything at all.

Any help would be really appreciated.

2

There are 2 best solutions below

6
On

Run the console on Chrome, saw the next errors on the new hosting while on your hosting not:

Uncaught SyntaxError: Unexpected token < jquery.min.js:1 Uncaught

SyntaxError: Unexpected token < jquery-ui.min.js:1 Uncaught

SyntaxError: Unexpected token < conditionizr.min.js:1 Uncaught

SyntaxError: Unexpected token < modernizr.min.js:1 Uncaught

ReferenceError: conditionizr is not defined www.modernandclassicautos.co.uk.php53-7.dfw1-1.websitetestlink.com/:43

Uncaught ReferenceError: Modernizr is not defined scripts.js?ver=1.0.0:6

When I clicked on the link to the jquery's file - I think I've found the problem. The difference between the two versions is the URL of the scripts. On the one that works:

http://ajax.googleapi...

While on the other one:

//ajax.googleapi...

UPDATE:

Consider following the next 2 suggestions:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js?ver=1.9.1"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

(1)Add http: before the //ajax in the `src.

(2) Why are you loading this file twice? remove the second line.

UPDATE 2

I've noticed you also have the following code: And the first js file does not exist on your server , therefore you see HTML - the HTML of the 404 page.

<script type='text/javascript' src='/ajax/libs/jquery/1.10.1/jquery.min.js?ver=1.9.1'>
</script>
<script type='text/javascript' src='/ajax/libs/conditionizr.js/2.2.0/conditionizr.min.js?ver=2.2.0'></script>
<script type='text/javascript' src='/ajax/libs/modernizr/2.6.2/modernizr.min.js?ver=2.6.2'></script>

Remove the first line. You're calling the same jquery script 3 times - not a good idea at all.

Hope it helped , update me if not.

0
On

Check the contents of your jquery.min.js and jquery-ui.min.js files. They appear to contain HMTL pages.