Results 1 to 3 of 3

Thread: Dropping to assign the imageurl to the image control the image was dropped on?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Dropping to assign the imageurl to the image control the image was dropped on?

    Hi Peeps,

    I have an image which the end user can drag and I now want to allow them to drop it over several other image controls and populate that image control with the dragged image. Can anyone please help as I am a novice to jQuery!!!



    Jiggy!

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Re: Dropping to assign the imageurl to the image control the image was dropped on?

    Okay I can now do the above but does anyone know a better solution because I will have to have the drop event for all 16 image controls? Here is my code:-

    <script type="text/javascript">
    function pageLoad(){
    $('#divPreview').draggable({ helper: "clone",
    cursor: "move"
    });
    $('#divCleanTool1').droppable({
    drop: function (event, ui) {
    var $imagedrop = $('#divCleanTool1').find('img').map(function () {
    var $imagedrag = $('#divPreview').find('img').map(function () {
    return this.src;
    }).get();
    this.src = $imagedrag;
    });
    }
    });
    };
    </script>

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,806

    Re: Dropping to assign the imageurl to the image control the image was dropped on?

    Plenty of views but not answers. Must be the only way to do it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width