JQuery snippet no longer works on new server.

Posted on 2011-10-03
Last Modified: 2012-05-12
Hi All,

My knowledge of Jquery and javascript is not all that great but just moved my site to a new server and for some reason this code no longer hides the element on pageload:

Event.observe(window, 'load', function() {
		$$('.hide_on_start').each(function(node) {

Open in new window

Not sure what would cause this to happen but any element given the "hide_on_start" class should be hidden when the page is first loaded.

Any ideas why this has happened?
Question by:Mulith
    LVL 20

    Expert Comment

    by:chaitu chaitu
    LVL 11

    Accepted Solution

    Has the path to jquery changed ?

    Use firebug and see what the errors are...
    LVL 1

    Author Comment

    Ahh yes thank you maeltar, got  "Ajax not defined" error which then made me realize that I'd commented out prototip and scriptaculous reference.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
    Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now