i'm in litle trouble triing to obtain information about events fired by jQuery sortable.
I have this code working :
var sortable = $("#datatable-wrapper #example tbody").sortable({
cursor: "move",
tolerance: 'pointer',
});
sortable.bind( "sortout",function(e, ui) {
for(i in e)
alert("e."+i+" : " + e.i);
for(i in ui)
alert("ui."+i+" : " + ui.i);
for(i in this)
alert("this."+i+" : " + this.i);
for(i in $(this))
alert("$(this)."+i+" : " + $(this).i);
});
The problem is : I always get something like :
e.SomeProp : undefined //same for ui, this, and $(this)
It shows me the structure of these objects, but none of these propertys are defined. What did I do wrong ?
Thanks by advance.
Your loop puts the properties' name into the
ivariable as a string, but you're trying to access literallye.i, not the named property, and that IS undefined. Trye[i]to access the object property by its name.