Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Graham Davidson
Courses Plus Student 14,966 PointsThis code is driving me crackers aka mad
Ok so I have created a very simple disjointed roll over using JavaScript it works 100% on my local server - pop it on line and just does not work at all. I have put it on here any help would be sooo appreciated http://jsfiddle.net/g6zQM/
8 Answers

Matt Campbell
9,767 PointsWhat's it meant to do when you do what?

Graham Davidson
Courses Plus Student 14,966 PointsHi Matthew if you take a look at the live code on here http://www.justg.co.uk/rig-cms/danner-range and click on the Danner Recon Un-insulated (2nd row 1st product) the thumbnail when hovered over is suppose to change the main image.

Graham Davidson
Courses Plus Student 14,966 PointsThe code for the bit in question starts around line 277

Graham Davidson
Courses Plus Student 14,966 PointsThis is exactly the same code on exactly the same server - all be it not part of the wordpress site I am developing and it works fine http://www.justg.co.uk/danner-recon-uninsulated.php

Graham Davidson
Courses Plus Student 14,966 PointsI swapped out document.getElementById('mainImage1').src='http://www.justg.co.uk/rig-cms/img/products-large/danner-recon-2.jpg'; in my function to just show an alert and that works find so by the power of Greyskull it must be something to do with the above line of text

Graham Davidson
Courses Plus Student 14,966 PointsI swapped out document.getElementById('mainImage1').src='http://www.justg.co.uk/rig-cms/img/products-large/danner-recon-2.jpg'; in my function to just show an alert and that works find so by the power of Greyskull it must be something to do with the above line of text

Graham Davidson
Courses Plus Student 14,966 PointsIgnore all ramblings it works - good trust bit of trouble shooting of replacing code with things like alert() honestly I have been working on this for 12 hours and only just cracked it - but I cannot even tell you how happy I am

Chris Scott
7,673 PointsIt's a strange JSFiddle bug cause it worked for me on JSBin http://jsbin.com/amiQORU/1