Getting the value of second(=last) element in a DIV
Greetings,
There maybe several good answers to below question, but i have not come up with a single one.
Thanks in advance
Pancras
Situation:
a droppable 's function
drop: function (event, ui) {
$(this).prepend(ui.draggable);
ScoreUpdate(ui.draggable);
passes the ui.draggable to ScoreUpdate
in ScoreUpdate the draggable is passedin the variable TheItem
function ScoreUpdate(TheItem)
so The contents of TheItem:
<div id="Item" class="clsItem ui-draggable">
<div id="txtItem">Description of Item</div>
<input type="hidden" name="$ctl00$ScoreID" id="rptPanel1_ScoreID_0" value="10">
</div>
TheItem.html() equals <div id="txtItem...... and the <input type="hidden".... elements
Question:
var ScoreID=? (the result of ?should be 10)