Domanda

Ho il seguente:

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

Ho appena aggiornato jQuery da 1.2.6 a 1.3.2, e ho anche aggiornato la libreria jQuery UI alla versione più recente.

È stato utile?

Soluzione

L' 'elemento' Si è rimossa nelle versioni più recenti jQuery UI, vedere questo bug report e corrispondente sorgente changeset .

Secondo questi, si dovrebbe usare $(this) invece:

fromRowId = $(this).attr('id');
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top