hallo everyone, the drag and drop app that i have built functions perfectly in chrome and firefox but when i try it on IE i get "Object required" as error . so the draggable() does not work at all. can anyone please help me solve this bug.thanks
function readJSON(json, i, end) {
myarray = eval(json);
$.each(myarray, function (index, value) {
if (i <= end && i == index) {
var $str = value.split('<br/>');
var $tooltip = $('<span></span>').html($str[0]).addClass('tooltiphidden');
var $newDiv = $('<div id =\"' + $str[3] + '\"></div>').addClass('items').html($str[1] + ' ' + $str[2]);
$newDiv.append($tooltip);
$newDiv.mousedown(function () {
$newDiv.contents("span:last-child").css({
display: "none"
});
moveditem = $str[0] + '<br/>' + $str[2];
}).draggable({
helper: 'clone',
opacity: 0.5
});
$('div.selectedItemlist').droppable({
accept: 'div.items',
drop: function (e, ui) {
$newSelectedItem = $('<div id=\"' + ui.draggable.attr('id') + '\"></div>').html(ui.draggable.html()).addClass('dropitems');
$tooltip = $('<span></span>').html(moveditem).addClass('tooltiphidden');
$('input#inrs').val($('#inrs').val() + ui.draggable.attr('id') + ',');
$('div.selectedItemlist').append($newSelectedItem);
ui.draggable.remove();
$('div.selectedItemlist').css({
backgroundColor: 'white',
opacity: 1
});
},
over: function (e, ui) {
$('div.selectedItemlist').css({
backgroundColor: 'red',
opacity: 0.2
});
},
out: function (e, ui) {
$('div.selectedItemlist').css({
backgroundColor: 'white',
opacity: 1
});
}
});
$newDiv.appendTo('div.suggestions');
i++;
}
});
}