View Full Version : text in button change on click - multiple times

01-25-2012, 03:20 PM
Hi there! I need help!

Basically, I need to create a sentence and on one of the words the person accessing the site can click the word and it will change to another word and then again to a third word and so on for 5 words then it will, on click, return to the 1st word again. like a circle of various words.

I've managed to get it to work with 2 words back and forth - but I need it to have multiple states. I need the JS and how to impliment it in the HTML. JS isnt my strong point just yet :( :confused:

Please help me! Thanks so so much!

follow me on twitter - @robyn_90

01-25-2012, 03:47 PM
like so?

Here is a <a href="javascript:void(0)" onclick="changeWd(this)"> nice</a> little sentence.
var count=0;
function changeWd(word){


but where is the button?

01-25-2012, 03:53 PM
xelawho - THANK YOU!!! I like totally love you right now!:p