Simple question about Jquery-UI sortable lists (http://jqueryui.com/demos/sortable/#default)
I have made:
<ul id="sortable">
<li class="ui-state-default">An item
<input class="delit" type="submit" value="Delete" />
</li>
</ul>
How can I make each item have a button that deletes the item it is next to? What's the syntax for this?
<ul id="sortable">
<li class="ui-state-default">An item
<button class="delete">Delete</button>
</li>
</ul>
JS:
$("#sortable .delete").click(function() {
$(this).parent().remove();
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With