Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inspect helper clone

I use the Google Chrome developer tools. When I want to inspect an element, I usually right click it and select "inspect element". This doesn't work for draggable helper clones. My code is as follows:

$myElement.draggable({helper: 'clone'});

How can I inspect the helper clone that is only created once I start dragging the element?

like image 706
Randomblue Avatar asked Sep 24 '11 16:09

Randomblue


People also ask

Can I copy code from inspect element?

You can copy by inspect element and target the div you want to copy. Just press ctrl+c and then your div will be copy and paste in your code it will run easily.

How do you inspect a dragged element?

Open the developer tools. Now start dragging the thing you want, and when it's time press any key on your keyboard and you'll be able to inspect the dragable element.

How do you enter inspect element codes?

Click any page element to reveal its source in the inspect panel. To modify or delete a page element, select its code in the inspector. Then, either double-click to change the text, or right-click and choose Edit as HTML or Create New Node to add code.


1 Answers

Just throw an exception from inside some code that is triggered while you are dragging - this will kill the js that erases the draggable element when you release the mouse button and freeze the draggable where it was on the screen when the exception occurred.

Then you are free to inspect it to your hearts content :)

The easy way is to throw an exception when you try to drop the element on a dropable, that's how i usually do it.

like image 113
Martin Jespersen Avatar answered Oct 17 '22 18:10

Martin Jespersen