Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/12/2016, 13:36
killpe
 
Fecha de Ingreso: octubre-2015
Ubicación: españa
Mensajes: 53
Antigüedad: 8 años, 6 meses
Puntos: 1
Respuesta: Actualizar input al ordenar con sortable

Me respondo a mi mismo con la solución por si a alguien le sirve

Código:
$("#sortable_nav").sortable({
	items: ".ordenable",
	cursor: 'move',
	opacity: 0.2,
	update: function(event, ui) {
		$('.ordenable').each(function() {
			var newVal = $(this).index() + 1;
			$(this).find('. ordena').val(newVal);
		});
	}
}).disableSelection();
lo mismo hay alguna forma mas elegante de hacerlo, pero esta funciona de momento :)