Thank you for your reply.
I just tried your code and it works. However, what i am trying to do is to validate other element not the dragging element. Could you add some code to output the innerText of element (class="DemoTitle") during dragging before release mousedown.
Please see below gif here. (Example website is yahoo mail.
Login to Yahoo Mail, Click Compose, Click Attachment button from the bottom toolbar, Click Add photos from recent email and try to drag & drop some images or gif's)
In this case, we want to drag the photo thumbnail from the right side bar to the left side richtextarea. The drag and drop area shows up only during the dragging event. We want to validate the drag and drop area before releasing the mouse button to drop the image into that area.
Thank you very much for your time.