What i need is a JS function deleteSelected() That removes the elements that are in the selectedDivs array from my HTML page. What is the most effective way?
Delete selected HTML:
<div class="DRAGGABLE ui-draggable" onclick="addDevice(this)" style="position: absolute; width: 240px; height: 41px; top: 126px; left: 27px;">
<img id="PMF00" src="/devices/AIRC1-010.gif">
</div>
JS:
function addDevice(e) {
if ($ctrlBeingpressed == true) {
selectedDivs.push(e);
e.style.border = "2px dotted black";
}
}
Apparantely there is already a post for this :/