I am trying to set a background image to a DIV with jquery draggable and droppable. It works on all browsers but IE (at least IE 9 which I am testing on).
Could not find something wrong in the code, anyone has an idea why it does not work?
$(function() {
$("#draggable1" ).draggable({helper:'clone'});
$("#draggable2" ).draggable({helper:'clone'});
$("#draggable3" ).draggable({helper:'clone'});
$( "#droppable" ).droppable({
drop: function( event, ui ) {
$("#droppable").css('background-image', 'url(' + $(ui.draggable).attr("src") + ')');
}
});
});
Demo here: http://jsfiddle.net/spairus/tXCjH/57/
Thanks
IE doesnt have by default console support which make script to stop, press F12 to open it or set debugmode to false:
DEMO HERE
BTW, you could simplify your code to: