If you are interested, I used a workaround for dragging a cell.  The item to
be dragged is the cell's contents, and the drag handle is the cell itself.

Now, the standard idrag.js looks for an optional handle going down the
hierarchy.  I made this change:

var dhe = o.handle ? (o.handleUp ? jQuery(jQuery(this).parents(o.handle)[0])
: jQuery(this).find(o.handle)) : jQuery(this);

on line 503 of the idrag.js file.

So calling a drag

$('a.classname').Draggable({ handleUp:true, handle:'td' });

Would move the A element around, but the handle initiating the drag would be
the TD.

JK
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dan G. Switzer, II
Sent: Friday, April 13, 2007 6:54 AM
To: [EMAIL PROTECTED]
Subject: [jQuery] Re: What is the right "find" expression?


Dave,

><div class="student">
><td width="100%"  class="student"><input type="hidden" name="stu_1"
>id="stu_1" value="1" class="studentField">Alvarado, Dave (ID: 3)</td></
>div>
>
>How do I extract this value?  Thanks, - Dave

I think you're going to have issues trying to drag a <td /> cell around. It
could cause unexpected results.

To answer your direct question though, this should grab the value of the
hidden form field:

$("input:hidden", $(drag)).val();

Or you could use:

$(drag).find("input:hidden").val();

And dozen more. I'm not sure which of the two is this most "efficient"
method, but I tend to use the first option.

-Dan


Reply via email to