# JS: Help with a Switching Function (possible?)

**URL:** <https://forum.kirupa.com/t/js-help-with-a-switching-function-possible/188576>\
**Category:** web dev\
**Created:** [May 9, 2006, 5:47am UTC](https://forum.kirupa.com/t/js-help-with-a-switching-function-possible/188576 "2006-05-09T05:47:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![denizengt](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@denizengt](https://forum.kirupa.com/u/denizengt)\
**Post date:** [May 9, 2006, 5:47am UTC](https://forum.kirupa.com/t/js-help-with-a-switching-function-possible/188576/1 "2006-05-09T05:47:31Z")

</div>

I have a DIV with with a background which has an arrow facing down on it. I have another image which has an arrow pointing right.

What I’m trying to do, is when I click on the DIV, the DIV’s background is changed to the second background with arrow pointing right. If I click on it again, the background is changed to the original background with arrow facing down.

It’s probably simple, but I’ve been trying for hours and am royally stuck :puzzled:
