# Javascript simple question! please help!

**URL:** https://forum.kirupa.com/t/javascript-simple-question-please-help/329251
**Category:** Uncategorized
**Created:** [August 6, 2012, 5:51pm UTC](https://forum.kirupa.com/t/javascript-simple-question-please-help/329251 "2012-08-06T17:51:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![camaleon](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@camaleon](https://forum.kirupa.com/u/camaleon)
#### Post date: [August 6, 2012, 5:51pm UTC](https://forum.kirupa.com/t/javascript-simple-question-please-help/329251/1 "2012-08-06T17:51:36Z")

</div>

Hi guys.

I have this code, a text that change when you click on him.

the code work fine but I want that when I click a second time the text change again to the 1st text. and continue to change as I click.

```auto

<div onclick="changeText(this)">More stuff</div>
<script language="javascript">
function changeText(currentElement){
currentElement.firstChild.data="Less stuff";
}
</script>

```

thanks for help!
