AshesOfOwls / jquery.shapeshift

A dynamic grid system with drag and drop functionality.
http://ashesofowls.github.com/jquery.shapeshift/
MIT License
1.67k stars 311 forks source link

Get element selected during drag before drop #153

Open namlq93 opened 5 years ago

namlq93 commented 5 years ago

Can not get element selected during drag before drop?? I tried event ss-arranged, but it only gets the parent element of the selected element.. Is the library unable to do that?

I tried the code below, but it won't work when I drag the item from one box to another the first time. From the second time it works. Seems like it conflicts something with the library ??

  $(".item").draggable ({
            drag: function (event, ui) {
                console.log($(this));
            }
    });
namlq93 commented 5 years ago

I have found solution:

$( ".item" ).on( "drag", function( event, ui ) {
        console.log($(this));
    } );