]> source.dussan.org Git - jquery-ui.git/commitdiff
demos/sortable/connect-lists-through-tabs: finetuning
authorBohdan Ganicky <bohdan.ganicky@gmail.com>
Mon, 9 Feb 2009 11:13:42 +0000 (11:13 +0000)
committerBohdan Ganicky <bohdan.ganicky@gmail.com>
Mon, 9 Feb 2009 11:13:42 +0000 (11:13 +0000)
demos/sortable/connect-lists-through-tabs.html

index 1744c0eb957f3892171f5bd589ebc21db32f8403..a768ef7f862fb1b0de5d27f52e26af41b85dbaff 100644 (file)
 
                var $tabs = $("#tabs").tabs();
 
-               var $tab_links = $("a",$tabs).droppable({
+               var $tab_items = $("li",$tabs).droppable({
                        accept: ".connectedSortable li",
+                       hoverClass: "ui-state-hover",
                        drop: function(ev, ui) {
-                               var $link = $(this);
-                               var $list = $($link.attr('href')).find('.connectedSortable');
+                               var $item = $(this);
+                               var $list = $($item.find('a').attr('href')).find('.connectedSortable');
 
                                ui.draggable.hide('slow', function() {
-                                       $tabs.tabs('select', $tab_links.index($link));
+                                       $tabs.tabs('select', $tab_items.index($item));
                                        $(this).appendTo($list).show('slow');
                                });
                        }