We can change the element background when click using this code

```
$("#coolMenu li").click(function(){ 
  $(this).css('background-image', 'url(images/li-bg2.png)');
});

```

What if I need to add a function on onclick, like

```
    <ul id="coolMenu">
      <li>
        <a href='#' onclick="callMe(this)";>Click me</a>
      </li>
    </ul>

```

How to change the element background inside the function?

```
function callMe(obj)
{
    //do something
    //change element background other than using the above code

}

```