PDA

View Full Version : Switch Content Script-change to onmouseover



glz
03-24-2007, 06:41 PM
1) Switch Content Script:

2) http://dynamicdrive.com/dynamicindex17/switchcontent.htm
http://dynamicdrive.com/dynamicindex17/switchcontent.js

Hello everyone, I need some help configuring this script to work on "onmouseover" instead of "onclick"

basically the way the script works is that you can collapse and de-collapse content by clicking on a link (onclick), and I want to change this behavior to when you hover over the link it expands or collapses

I figured it shoudl be quite simple to do just look in the .js file for where it talks about "onclick" but apparently i'm not so good at parsing javascript :(

I'm more of a php head


so i'd appreciate of someone coudl point out to me what I need to do or what changes i need to make to the script to let me expand or collapse content based on hover on onmouseover instead of onclick

ok well i suppose you can ignore the other question
because I tried this: i replaced all instances of "onclick" to "onmouseover"

in the switchcontent.js script file

so my new question is:
now that it is onmouseover instead of onclick, I would like for it to ALWAYS collapse whenever its done expanding, and never stay open

so what do I need to change in switchcontent.js in order to do that?

tech_support
04-08-2007, 07:43 AM
Chill man.

tech_support
04-08-2007, 07:47 AM
And this is the code if you still want it: