jeditable settings
$('.editable').editable('includes/notes/save.php', {
loadurl : 'includes/notes/load.php?id=' + $(this).find("div").prop("id"),//undefined child ID
type : 'text',
onblur : 'submit',
indicator : '<img src="includes/notes/indicator.gif">',
style : 'display: inline'
});
html
<tr class="items">
<td>
<?php echo $data['item_name']; ?>
</td>
<td>
<div class="editable inventory-notes">
<!-- need to get the child id below into jeditable -->
<div id="<?php echo $data['id']; ?>">
<div class="add_note"></div>
<div class="edit_note"></div>
<div class="delete_note"></div>
</div>
</div>
</td>
</tr>
How can I get the ID $data['id'] into jeditable loadurl ? I am using jQuery 1.6.2. The data set has around 1,200 rows.
I see that second argument of
.editable()is anObjectand not aFunction, sothiswill not work here. You’ve to store theidbefore and use it within.editable()configuration.According to comment
I think your whole code is within
click()handler and you need to useto get current clicked
id.