Results 1 to 4 of 4

Thread: JS hampers links from working properly

  1. #1
    Join Date
    Dec 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up JS hampers links from working properly

    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

  2. #2
    Join Date
    Dec 2007
    Location
    Essex, UK
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I can see what you are trying to do, but you refer to an array called sections, but this is nowhere defined.

    John Rostron

  3. #3
    Join Date
    Dec 2007
    Location
    Portugal
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Change this

    Code:
    if (link.rel != undefined) {
    to

    Code:
    if (link.rel != '') {
    Hope it helps.

  4. #4
    Join Date
    Dec 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks!

    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,

    cheers,
    Giuseppe

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •