I have this function that I’m using to open a modal dialog that I need to populate with some information from the ‘dblclicked’ node:
$(function(){
$(".delete").live('dblclick', function () {
var id = $(this).attr('id');
$('#delID').val(id);
var txt = this.parentNode.children[2].innerHTML;
$("#details").html(txt);
$("#delAssign").dialog('open');
});
});
Example of the html:
<tr>
<td class='delete'></td>
<td></td>
...
<td></td>
</tr>
<tr>
...
</tr>
Right now I’m getting the
var txt = ...
with pure javaScript.
The question is “How can I achieve the same result for the var txt using jQuery?”
You can change it to:
I think it’s the fastest solution.