#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    Moving a DIV or Label, when another DIV is moved.


    Dear Sir,

    Underneath an Image, I have a Label. i.e. Picture of a person & the label is the name of the person.

    I have been able to make the Image draggable.

    I want to move the Label (name of the person), along with the Image. i.e. when the Image is moved, the Label also moves with the Image.

    -SK
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0
    I found it !!!

    Code:
    var ofst = $('#' + ev.target.id).offset();
    $("#lbl0").offset({top:ofst.top,left:ofst.left})
    Last edited by Kravvitz; January 18th, 2013 at 04:08 PM. Reason: added [code] tags

IMN logo majestic logo threadwatch logo seochat tools logo