]> source.dussan.org Git - jquery-ui.git/commitdiff
Shopping-Cart demo: Fix the eager activeClass on sorting
authorunknown <joern.zaefferer@gmail.com>
Tue, 30 Mar 2010 20:08:04 +0000 (22:08 +0200)
committerunknown <joern.zaefferer@gmail.com>
Tue, 30 Mar 2010 20:08:04 +0000 (22:08 +0200)
demos/droppable/shopping-cart.html

index c57a61fe14cf6a2ceb9f19037cf0a79f08c78202..4cfd2e199c2fabe9274cef4d7e7e316d41f1d279 100644 (file)
                                $("<li></li>").text(ui.draggable.text()).appendTo(this);
                        }
                }).sortable({
-                       items: "li:not(.placeholder)"
+                       items: "li:not(.placeholder)",
+                       sort: function() {
+                               // gets added unintentionally by droppable interacting with sortable
+                               // using connectWithSortable fixes this, but doesn't allow you to customize active/hoverClass options
+                               $(this).removeClass("ui-state-default");
+                       }
                });
 
        });