PDA

View Full Version : Switch Content Script II - Need help



PurpleCow
06-22-2007, 04:13 AM
1) Script Title: Switch Content Script II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm

3) Describe problem: I am looking at integrating this switch content script on my pligg site on various pages like main page and related paginated pages, search results pages and other similar pages.

However, this script looks to coded to work for static pages, my site being dynamically driven, how can i integrate this into my site.

I hope it's okay to show you my site and explain what I need;

1. Check the site www.tmhgih.com [It uses pligg script highly customised]
2. I have a couple of sample stories posted. Likewise there would be many stories on each page. Consider 1 story as example - 'Apple - Say Hello to iPhone'
3. Each story has a title and in the same row the rating system. Below that is the other related details for each story.

Now by default, I want to show an icon, title [linked to an external source] and rating system [right aligned] in the same row. Now I want the content below this row to be hidden by default when the page loads for all stories. When the user clicks on an icon the related content for that story should scroll down and if the user attempts to expand another story by clicking on icon for that story, then the previous one should hide.

How can i achieve this?

Can someone do a little hand-holding and help me with this.

I have been search for this script for a long while and now that i found it, i would love to integrate it into my pligg site.

Thanks much in advance

ddadmin
06-23-2007, 12:17 AM
It all depends on how much control you have over the output of each entry. Switch Content II follows the following conventions:


What is JavaScript? <span id="faq1-title" class="iconspan"><img src="minus.gif" /></span>
<div id="faq1" class="icongroup1">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents.
</div>

So if you can generate the highlighted parts dynamically for each entry, it should work. You may also want to see this thread (http://www.dynamicdrive.com/forums/showthread.php?t=21881), and even this script (http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm).