Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Jquery not working on one server, works on another?


Go to End


2 Posts   3802 Views

Avatar
Roony

Community Member, 14 Posts

8 October 2010 at 9:13pm

So I have my website up and running on my own domain with dreamhost, which i used as a testing server so I could see the site online. My Jquery loads perfectly here and the site functions how i want it to.

When I uploaded the exact same site to Media Temple for the actual hosting all of a sudden the jquery stopped working altogether. The slider on the home page no longer works and neither does the image gallery ui?

The website addresses are as follows:

dreamhost - www.creativitree.com.au

media temple - www.unya.org.au

Any Ideas as to why this is happening?

When I view the source code there is a lot more javascript files being included on the media temple version? I have read a lot of forums about prototype.js conflicting with jquery when it is loaded after.

But i do not know why it is being loaded here if it never was on the old site?

Need to fix this urgently as the site is now live, because i thought it was all working properly.

Thanks in advance

Avatar
zenmonkey

Community Member, 545 Posts

9 October 2010 at 2:54am

Well off the bat, the dreamhost site is loading JQ 1.3.1 while media temple loads 1.4.2, so is your slider dependancy okay?

Also make sure you wrap your jQuery Code in

(function($) {
     your jQuery Code
})(jQuery);

This should avoid any prototype conflicts. http://doc.silverstripe.org/javascript