Sortierbare clone helper funktioniert nicht

Vielleicht ich verstehe nicht, wie Klonen funktioniert mit Sortier -, aber hier ist, was ich gerne tun würde.

Beim Sortieren ein Element, ich würde wie ein Klon von dem Artikel, den ich am ziehen bleiben, bis ich stop drop das Element in die neue position.

Hier der code:

<html>
<head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>

    <style type="text/css">
        .sort { width: 150px; }
        .ui-state-highlight { background-color: #000; height:2px; }
    </style>
</head>
<body>
    <div>
        <ul class="sort">
            <li>Item 1</li>
            <li>Item 2</li>
            <li>Item 3</li>
            <li>Item 4</li>
        </ul>
    </div>

    <script type="text/javascript">
        $(function() {
            $('.sort').sortable({
                helper: 'clone',
                placeholder: 'ui-state-highlight',
                opacity: '.5'
            })
        })
    </script>
</body>
</html>

Vielen Dank im Voraus für die Hilfe!

InformationsquelleAutor Jeremy Seekamp | 2010-06-11

Schreibe einen Kommentar