View Full Version : JS hampers links from working properly

12-09-2007, 02:49 PM
Please go to http://www.giuseppecraparottacv.co.uk/cv.html.
As you can see I typed (a friend gave it to me...) some Javascript code allowing to open/close different content areas when clicking on the area link.
The unwanted result is that all links internal to the content areas now function as the area links, closing the areas when you click on them. That's grave!
Can somebody tell me how to modify the JS code (if you reported the code it would be great!). I know I shouldn't use JS if I can't handle it, I know, I know... please just help me! Thanks, G

12-09-2007, 04:43 PM
I can see what you are trying to do, but you refer to an array called sections, but this is nowhere defined.

John Rostron

12-09-2007, 09:45 PM
Change this

if (link.rel != undefined) {


if (link.rel != '') {

Hope it helps.

12-14-2007, 02:35 PM
Hey hrcerqueira, thank you so very much,
if saying you saved my life is a little bit exagerated, it is absolutely realistic to say you are the main contributor of my good mood in the next seven days.

I tested your change and it works properl now,

thanks and have a nice christmas,