JQuery: calling ajax on drop element

Posted by Lukasz Baran on Stack Overflow See other posts from Stack Overflow or by Lukasz Baran
Published on 2011-01-04T10:24:11Z Indexed on 2011/01/04 10:54 UTC
Read the original article Hit count: 271

Filed under:
|
$("div.square").droppable({
        accept: '.white',
        drop: function (event, ui)
        {
            $to = "#" + $(this).attr('id');
            alert(to);
            $.post(
        "/Game/AddMove",
        {
            from: $from,
            to: $to,
            GameID: $("#gameID").val()
        });
        }
    });

Well it's nor working. So I must ask, is it possible to call AJAX on droping some UI element ?

The problem is, it's not even calling an controller,

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about jquery-ajax