I am trying to use javascript to control the background color of a form element, what I have so far:
<script type="text/javascript">
$(document).ready(function() {
$('option.POIs').click(function() {
$(this)
.css('background-color','#EE178C')
});
});
</script>
It works well, however I would like for it to toggle between to different colors. Default color would be #FFFFFF and the other would be #EE178C. So when the page loads the bg color is #FFFFFF when I click on the item the bg changes to #EE178C, and if I click on it again it goes back to #FFFFF.
Any help would be appreciated!
FYI
script