Results 1 to 3 of 3

Thread: Change Cursor in Collapsible Text

  1. #1
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Change Cursor in Collapsible Text

    Hi..Loved the code you had on the following page:

    http://www.dynamicdrive.com/dynamicindex1/navigate2.htm

    But, I'd like the cursor to change to a pointer when I click on the headers that expland and collapse. It stays on the I-bar or text cursor, rather changing to the pointer. I've found the code here and other sites, but can't figure out where the code should be added in the text given in the above URL.

    Any help would be great! Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The headers have the pointer cursor for me on the demo page. Did you follow the installation instructions including where it has, for example (from Step 2 on the demo page):

    Code:
    <h3 onClick="expandcontent('sc1')" style="cursor:hand; cursor:pointer">What is JavaScript?</h3>
    <div id="sc1" class="switchcontent">
    JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
    </div>
    
    <h3 onClick="expandcontent('sc2')" style="cursor:hand; cursor:pointer">Differ . . .
    ?

    Alternatively, if all of your headers have a class of header, you can put this in your stylesheet:

    Code:
    .headers{
    font: bold 16px Arial;
    cursor:hand;
    cursor:pointer;
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John,

    The cursor code wasn't there when I pasted the text from the site. I would have seen it.

    Thanks as that fixed the problem.

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
  •