?
Solved

JQuery snippet no longer works on new server.

Posted on 2011-10-03
3
Medium Priority
?
205 Views
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) {
			node.hide();
		});

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?
0
Comment
Question by:Mulith
3 Comments
 
LVL 20

Expert Comment

by:chaitu chaitu
ID: 36903478
$('.hide_on_start').
0
 
LVL 11

Accepted Solution

by:
maeltar earned 2000 total points
ID: 36903553
Has the path to jquery changed ?

Use firebug and see what the errors are...

http://getfirebug.com/
0
 
LVL 1

Author Comment

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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)
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

850 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