Wednesday, 4 September 2013

Change text forth and back inside a div

Change text forth and back inside a div

I have a small problem with a text area inside a div and a span tag. What
it does, is to be a href for opening a drop-down div, and when clicked
again on the text it closes that div.
<a href="#" id="toggle4">
<span class="halfCircleBottom">OPEN</span>
</a>
So what I want to achieve is, when I click on OPEN, it should change to
CLOSE, and when I click back on CLOSE it should change to OPEN. Everything
I've found so far is to change the text once, but not back again to the
original value.

No comments:

Post a Comment