Jump to:

3392 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » Jquery not working on one server, works on another?

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

Page: 1
Go to End
Author Topic: 2207 Views
  • Roony
    Avatar
    Community Member
    14 Posts

    Jquery not working on one server, works on another? Link to this post

    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

  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Re: Jquery not working on one server, works on another? Link to this post

    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

    2207 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.