I have the following html:
You can use:
ui.draggable.find('a').attr('href')
This will look for the a
element among all descendants of the draggable element.
To look only at the direct children of the draggable, use this instead:
ui.draggable.children('a').attr('href')
Try this:
$(this).children('a').attr("href");
Does that work for you?