jQuery(function ($) {
$('.drag').drag(function (ev, dd) {
$(this).css({
top: dd.offsetY,
left: dd.offsetX
});
}, { not: ['a', 'img'] }); // this is where I am passing an array of strings of selectors
});
Change in the code is as follows:
FROM:
if if ( $( event.target ).is( dd.not ) )
return;
TO:
if (dd.not.indexOf($(event.target)[0].localName ) !== -1)
return;