Quizás no entiendo cómo funciona el clon con ordenable, pero esto es lo que me gustaría hacer.Asistente de clonación no funcionable
Al ordenar un artículo, me gustaría que un clon del artículo que estoy arrastrando permanezca hasta que deje de colocar el artículo en su nueva posición.
Aquí está el código:
<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>
Gracias de antemano por la ayuda!
$ (ui.item) .show() sería más 'exacta' – Vigrond
Y $ (ui.helper) contiene el ayudante clonado. Si desea modificarlo – Armin