$("#here").droppable({
    tolerance: 'fit',
    accept: ".accepted",
    drop: function(event, ui) {
        var draggable = ui.draggable;
        var id = draggable.attr("id");
        $.post('changelocation.php', {
            fileid: id
        }, function(data) {

            alert(data);

        });

        //handling for success..
    }
});

I have the code above and my problem is that the php file is posted when started dragging, and again when dropped successfully. I've checked this with google chrome debug tools... My draggable script is this:

$(".accepted").draggable({
        start: function() {
            $(this).addClass('dragged');
            $('.accepted').not(this).addClass('others');
        },
        revert: 'invalid',
        snap: ".snap",
        snapMode: "outside",
        obstacle: ".others",
        preventCollision: true,
        stop: function() {
            $(this).removeClass('dragged');
            $('.accepted').not(this).removeClass('others');
        }
    });

What could make this post when started dragging??

link|flag

What extensions are you using? The obstacle and preventCollision options are not supported by jQuery UI's draggable. Is there something you're not telling us? ;) – DarthJDG 1 hour ago
Could you please post a sample of your mark-up used to produce this issue? – Dvir Azulay 1 hour ago
@Darth its a collision plugin link @Dvir I'm sorry i don't understand what you mean by mark-up – Logan 51 mins ago

Know someone who can answer? Share a link to this question via email, twitter, or facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.