Utkarsh Singh
Utkarsh Singh

Reputation: 283

Drag and drop in side a table using jquery

How do I drag and drop an elemet from one to another and all other s align themselves accordingly in a 3x3 table using jquery? Please help me out here. I am really confused.

This is what I have tried so far:

   $(document).ready(function(){
        $(".smsSecond").draggable({containment: ".maincol"});//, revert: true

    $(".smsSecond").click(function(){
        $(this).hide(500);
    });

    $(document).bind("contextmenu", function(e) {

    $('.smsSecond').show(500);

    return false;

});
});

Upvotes: 0

Views: 143

Answers (1)

i-bob
i-bob

Reputation: 423

try jQuery UI, the example and resource is here. You can change it to fit your needs.

Upvotes: 2

Related Questions