My table looks like this:
How can I get jquery to remove the dropdown or clear the contents from the last cell if my first cell has a value in it? The dropdown should only appear if the first two cells are blank.
<table>
<tr>headings here</tr>
<tr>
<td>name</td>
<td>id</td>
<td>other id</td>
<td>status</td>
<td>select location</td>
</tr>
<tr>
<td>name</td>
<td>id</td>
<td>other id</td>
<td>status</td>
<td>select location</td>
</tr>
<tr>
<td>name</td>
<td>id</td>
<td>other id</td>
<td>status</td>
<td>select location</td>
</tr>
</table>
EDIT
Got it. I needed a trim().
assuming that your table looks like
you can do this
you can remove the dropdown by selecting it and then removing it by using
removelikehere is the working fiddle http://jsfiddle.net/3nigma/uF7M5/4/
in the fiddle i have used
delayso that the value remains visible for a bit of timejquery :firstjquery :lastEDIT
i am assuming that if there is no name you want to hide/remove the
select locationhere is the fiddle http://jsfiddle.net/3nigma/uF7M5/3/