Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Collapsible/Expandable divs not working! [Edit: Need help with rollover cursor]

    Hello everyone!

    Thanks so much for dropping into my thread, I appreciate your time.

    I'm creating a mini little directory of book publishers, for my website on fiction writing. I found a neat javascript code online that allows me to collapse and expand chunks of text, by clicking on the paragraph title. It uses divs and some sort of display property.

    All was going well, and I kept testing it every couple of minutes (each time I adjusted something like background colour, a table layout etc). It was working perfectly up until about an hour ago. I don't know what I changed, but now only the first div works.

    Check out the page here: http://georgia.forestofimagination.c...ublishers.html

    You'll notice that when you click on AMERICA the inner layer opens just fine (and closes when you click it again.) But none of the following categories do the same.

    I can't find what I've done wrong. I'm new to this code. Please take a look at the page source and tell me what the error is. I bet I did something stupid like delete an apostrophe somewhere - but I can't tell!

    Thanks for trying to help me, have a great day!

    Georgia
    Last edited by Asphyxiated; 10-16-2005 at 01:24 PM.

  • #2
    New Coder
    Join Date
    Apr 2005
    Location
    Burnaby, BC, Canada
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just change all occurances of: toggleDisplay0(event)

    to:

    toggleDisplay(this)
    'Programming is the only artform that fights back!'

  • #3
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi dialbo!

    I love that quote your signature - hahaha!

    Thanks so much for your help. It works perfectly now! *hug* Thank you thank you!

    I really should take some programming classes or something.....

    Georgia

  • #4
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm posting here again because I also would like to know if there is a way to make the cursor change to a hand when it goes over one of the category names, like AMERICA or UNITED KINGDOM. Currently, it defaults to a text cursor (the I thing).

    I'd like to emphasise (to dummy users) that the country names are clickable by making the cursor change to a hand when it hovers over a category title. Anyone know what code to put where to make this happen?

    Thanks again all! You're a great bunch.

  • #5
    New Coder
    Join Date
    Apr 2005
    Location
    Burnaby, BC, Canada
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In the css code, add cursor: pointer; to the outer class.
    Then add cursor: default; to the inner class.

    IE:

    .outer {border: 1px solid black; background-color: #FFFFFF;
    color: #000000; padding: 5px; cursor: pointer;}
    .inner {border: 1px solid black; background-color: #F6ECDA;
    color: #000000; padding: 5px; cursor: default;}
    'Programming is the only artform that fights back!'

  • #6
    New to the CF scene
    Join Date
    Oct 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks again diablo! It works perfectly now. You've been fantastic.

    *hugs*


  •  

    Posting Permissions

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