I'm creating a board that allows a user to click and drag items between the board categories and once a new item is added I would like an icon to show on the category, as a confirmation.
However my question is, using JS how would I trigger the icon to show when an item is dragged into its category?
<div id="board">
<ul id="catagory-1">
<li id="item1" draggable="true" class="item">item1</li>
<li id="item2" draggable="true" class="item">item2</li>
<li id="item2" draggable="true" class="item">item3</li>
</ul>
<ul id="catagory-2">
<span id="icon2" style="display:none">icon</span>
</ul>
<ul id="catagory-3">
<span id="icon3" style="display:none">icon</span>
</ul>
</div>
I Imagine my Jquery would be something like this (but this obviously doesn't work):
$('#catagory-2').bind("DOMSubtreeModified",function(){
$('#icon2').toggle();
});