View Full Version : Switch Content Script I Help

06-13-2007, 04:07 AM
1) Script Title:
Switch Content Script

2) Script URL (on DD):

3) Describe problem:

Hi I am trying to put the cross image after the question instead of begining. how can I do that??
Lets says default is:
[x]What is Javascript?
But I want to put the [x] image at the end like this:
What is Javascript? [x]

Thanks in advance

06-14-2007, 03:32 PM
You can easily do this, though the change would affect every switch content instance on your site. Inside switchcontent.js, find the line:


and change that to:


And also:

this.headers[i].innerHTML=this.headers[i].innerHTML+' <span class="status"></span>' //Add a span element to original HTML to store indicator

and change that to:

this.headers[i].innerHTML='<span class="status"></span> '+this.headers[i].innerHTML //Add a span element to original HTML to store indicator

You may want to look at using Switch Content script II (http://www.dynamicdrive.com/dynamicindex17/switchcontent2.htm) instead, which lets you place the toggling icon anywhere you like on your page.