On the stop event you can pick up the id (that you need to assign
additional ids to each image with class 'obj') of the image being
picked up.


On Nov 27, 5:02 am, leaderxman <[email protected]> wrote:
> <script>
> $(function(){
>         var $container = $('#container');
>         $(".obj").draggable({
>                 cursor: 'move',
>                 helper:'clone',
>                 scope:'mydrag'
>          });
>         $container.droppable({
>                 accept: '.obj',
>                 activeClass: 'myactive',
>                 hoverClass: 'myhover',
>                 scope:'mydrag',
>                 drop: function(e,ui) {
>         $(ui.draggable).clone().appendTo($(this)).resizable().parent
> ().draggable({containment: '#container'});
>                 }
>         });});
>
> </script>
> <div id="container">
> </div>
>  <div id="headlist">
>
>   <img src="images/1.jpg" width="100" height="100" class="obj" id="a" /
>
>    <img src="images/2.jpg" width="100" height="100" class="obj" id="b"/
>
>   </div>
> <div id="hairlist">
>   <img src="images/a.png" width="100" height="100" class="obj"  id="c"/
>
>    <img src="images/b.png" width="100" height="100" class="obj"
> id="d"/>
>    <img src="images/c.png" width="100" height="100" class="obj"
> id="e" />
>     <img src="images/d.png" width="100" height="100" class="obj"
> id="f"/>
> </div>

--

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=en.


Reply via email to