[jQuery] What is the right "find" expression?
Hi,
After dragging an object into a Droppable, using this code:
$('#classlistcell').Droppable(
{
accept: 'student',
tolerance: 'intersect',
activeclass: 'dropzoneactive',
hoverclass: 'dropzonehover',
ondrop: function (drag)
{
var name =
drag.innerHTML;
var id = /*
Need expression here */;
addStudentToClass(name, id);
}
}
);
I'm trying to form an expression for the "/* Need expression here */;"
line. I want to extract the value of "value" (in the below example
"1" from the hidden element. Below is the HTML that I assume is in
the "drag" object:
<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