That works if you want the info in the dragstart event. If you want it in
the drop event, use the ui.draggable property:

$("#droppable").droppable({
  drop: function(event, ui) {
    alert('info droppable = ' + $(ui.draggable).attr("info"))
  }
});

- Richard

On Tue, Nov 10, 2009 at 10:59 AM, MiracleLife <[email protected]> wrote:

>
>
> Try this:
>
> $('#draggable').draggable({
>     start: function(event, ui) {
>         alert('info draggable = ' + $(this).attr('info') );
>     }
> });
>
>
>
>
>
>
> On Tue, Nov 10, 2009 at 7:12 AM, Kilhom <[email protected]> wrote:
>
>> Hi everyone !
>>
>> Here is my problem :
>>
>> I have 2 div :
>> <div id="draggable" info="test drag"> </div>
>> <div id="droppable" info="test drop"> </div>
>>
>> I want to get the "info" attribut of "draggable" AND "droppable" when
>> I drop "draggable" on "droppable".
>>
>> Here is my code :
>>
>>        $("#droppable").droppable({
>>
>>        drop: function() {
>>                alert('info droppable = ' + $(this).attr("info"))
>>        }
>>
>>        });
>>
>> [ this code make an alert with "info droppable = test drop" wich is
>> good.]
>>
>> With that, I manage to get the "info" attribut of "droppable" but not
>> the one of "draggable"...
>>
>> Any idea ?
>> Thanks in advance !
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "jQuery UI" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<jquery-ui%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/jquery-ui?hl=.
>>
>>
>>
>
>
> --
> MiGs
>
>  --
> You received this message because you are subscribed to the Google Groups
> "jQuery UI" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<jquery-ui%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jquery-ui?hl=.
>

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=.


Reply via email to