Up until last week, the event target was a div.no_style_elearning_dropped_multiple_answer but suddenly it is now an img

So my old if statement no longer works:

if ($(event.target).is("div.no_style_elearning_dropped_multiple_answer")) {

I'm trying to replace it with the following if statement:

var droppedObj = $(event.target).closest("div.no_style_elearning_dropped_multiple_answer")[0];
if (droppedObj.className.indexOf('no_style_elearning_dropped_multiple_answer') != -1) {

It works fine but then the droppedObj does not give me access any more to the attribute elearningAnswerId

The following variable is undefined:

var elearningAnswerId = droppedObj.attr("elearningAnswerId");

Note that the element is dynamically added by:

var droppedContent = "<div class='elearning_question_answer no_style_elearning_dropped_multiple_answer' elearningAnswerId='" + ui.draggable.attr("elearningAnswerId") + "'>" + trim(ui.draggable.html()) + "</div>";

Is the droppedObj object a javascript object ? Is that why is doesn't have the jQuery attribute ?

Thanks for any tip.

Stephane