jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes jquery sortable question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jquery sortable question" Watch "jquery sortable question" New topic

jquery sortable question

Ernesto Leyva
Ranch Hand

Joined: Feb 23, 2006
Posts: 62

I implemented the jquery sortable plugin to be able drag and drop list-items between two lists. I apply some styles to my list items like putting different background for each list. the issue is when I drag one item from list A to list B most of the time I see the dragged elements but every now and then when i start dragging the element disappear from the screen I can still drag it but I cannot see it and suddenly appears again when I drop it. The only i am able to see in those cases is the mouse pointer.

here is my code:

Note: the switched var tells me if the item changed from list A to B or vice versa!
Note2: in the same page I load EXTJS and jQuery but I am not triggering EXTJS events when dragging and the list items are plain
  • elements

    var switched, senderID;
    $CQ('#sni-selection .sni-selection-list').sortable({
    start:function(e, ui){

    switched = false;
    senderID = '';

    stop:function(e, ui){

    if (switched){

    so.selection.move(ui, senderID);

    receive:function(e, ui){

    senderID = ui.sender[0].id;


I agree. Here's the link: http://aspose.com/file-tools
subject: jquery sortable question
jQuery in Action, 3rd edition