Updating table contents while dragging an item using jquery

My question is whether we can update the contents of the table while dragging / resizing the div. Content is the position and size of the div that is being dragged or resized help me

+3
source share
1 answer

Assuming you are using jQuery Draggable, you can use dragpart of it:

$("#draggable").draggable({
    drag: function() {
        var offset = $(this).offset();
         $(this).html(offset.left + ', ' + offset.top);
    }
});

Example: http://jsfiddle.net/QH6QP/

+2
source

Source: https://habr.com/ru/post/1757444/


All Articles