Log in

View Full Version : Change Cursor in Collapsible Text



sidhtml
06-05-2012, 10:02 PM
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!

jscheuer1
06-06-2012, 02:24 AM
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):


<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:


.headers{
font: bold 16px Arial;
cursor:hand;
cursor:pointer;
}

sidhtml
06-07-2012, 03:33 PM
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.:)