I have the table set up as

```
<table class="tab1" width="400" cellpadding="20">
     <tr>
         <td id="cell1">Name</td>
         <td id="cell2">Company</td>
     </tr>
</table>

```

It is being accessed using 

```
<script type="text/javascript">
     $(document).ready(function(){
         if($('#cell1').attr('click',true)) {
             alert("Cell 1 was clicked");
         }
     });     
</script>

```

I want the alert message to display when the cell1 is clicked. At present I do not get any output.