Pregunta

Tengo el siguiente:

$('#widgets ul').sortable(
{
  connectWith: ['#widgets ul'],
  opacity: 0.7,
  start: function(e, ui) {
    fromWidgetPosition = ui.item.prevAll().length + 1;
    fromRowId = ui.element.attr('id');

Acabo de actualizar jQuery 1.2.6 a 1.3.2 de, y también he actualizado la biblioteca jQuery UI a la última versión.

¿Fue útil?

Solución

El 'elemento' Se eliminó en las nuevas versiones de jQuery UI, consulte esta informe de error y la correspondiente de cambios fuente.

De acuerdo con ellos, usted debe utilizar en su lugar $(this):

fromRowId = $(this).attr('id');
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top