PDA

View Full Version : Switch Content Script



jah
11-25-2004, 08:44 PM
I've had this script (http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm) in use on my mixtape page (http://www.jah.clara.net/mixtape.html) for months and I've been really happy with the way it hides the track lists for all mixtapes on the page until the mixtape title is clicked. I have a lot of hits from people using search engines where they have searched for a particular track or artist. Because the keyword they have searched for is often within a track list and not immediately visible I've decided that I want to add a toggle button to the page so that the visitor can instantly unhide all the tracklists at once.

Does anyone have any idea if the above script can be modified to allow this?
I've tried, but so far I've had no luck - I'm still learning this javascript malarkey!

Any guidance would be gratefully received..

ddadmin
11-30-2004, 10:13 PM
Try my solution here: http://www.dynamicdrive.com/forums/showthread.php?t=48

jah
12-02-2004, 06:02 PM
Thank you for that ddadmin,
I guess I should have performed a search before posting and would have found your post. (I would have got round to doing it eventually!!)

It's a great addition to a great script making it just about a perfect script in all!
What I'm going to attempt next though is to somehow have one link that will toggle. Allowing the user to click the same link to either expand or contract thus being a little more intuitive.
The basic building blocks are within the code already (although I've yet to try and make sense of how the script actually works), but I want to try and make the same link read either "expand" or "contract" depending on the current state.

I'll post again, I think, when I've done it - or when I get stuck!!