Greetings,
I am using this script:
http://www.dynamicdrive.com/dynamici...tchcontent.htm
I would like to be able to press "c" on my keyboard and all the switch content contracts.
How would I implement such things into my script to get it to work?
Greetings,
I am using this script:
http://www.dynamicdrive.com/dynamici...tchcontent.htm
I would like to be able to press "c" on my keyboard and all the switch content contracts.
How would I implement such things into my script to get it to work?
Put his in the head after the call to the switchcontent.js file.
bobexample (here from the demo markup) refers to the switchcontent instance.Code:<script type="text/javascript"> document.onkeydown=function(e){ var e=window.event? window.event : e; if(e.keyCode=="C".charCodeAt(0)) bobexample.sweepToggle('contract') else if(e.keyCode=="E".charCodeAt(0)) bobexample.sweepToggle('expand') } </script>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks