I've come across numerous posts on this topic, but none of them have provided a solution.
I recently added drag and drop functionality to my website. When I drag an item over a valid container, I add a specific class to it.
Here is the HTML for the container:
<div id="boxL" class="boxL" ondrop="drop(event)" ondragover="allowDrop(event)" ondragleave="dragLeave(event)">
When the ondragover event is triggered, it executes the following JavaScript:
function allowDrop(ev) {
ev.preventDefault();
var id = event.target.id;
$(document).ready(function(e){
$('#'+id).addClass('dotted');
});
}
And here is the CSS class being used:
.dotted{
border: 5px dotted #212121;
}
This setup works perfectly in all browsers except for Firefox. Any ideas on how to fix this?