views:

25

answers:

1

Hi,

I have a problem where I have code like

<table id="table">
<tr>
<td>...</td>
<tr>
</tr>
<td>...</td>
</tr>
<tr>
<td>...</td>
</tr>
</table>

and JavaScript such that

$('#table').draggable(handle: '#table > tr:eq(0) > td:eq(0)');

but for some reason the entire table becomes the handle. It works when I set the td to have an identifier, but does not seem to work with selectors. Am I doing something wrong here?

+1  A: 

Try this approach:

$('#table').draggable({handle: 'tr:first > td:first'});

It looks for the handler inside the specified element.

Nick Craver
Damn man it worked! It works when I don't apply the element itself (#table) into the selector!
rFactor