<p>I am making an expand/collapse call rates table for the company I work for. I currently have a table with a button under it to expand it, the button says "Expand". It is functional except I need the button to change to "Collapse" when it is clicked and then of course back to "Expand" when it is clicked again. The writing on the button is a background image.</p>

<p>So basically all I need is to change the background image of a div when it is clicked, except sort of like a toggle.</p>

```
```
$('#divID').css("background-image", "url(/myimage.jpg)");
```
```
Should do the trick, just hook it up in a click event on the element
```
```
$('#divID').click(function()
{
  // do my image switching logic here.
});
```
```