facebook

Dynamically place image after custom list?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #332637 Reply

    Unknown Author
    Participant

    I’d like to place an image directly below a custom list. How do I access the x- and y- coordinates of an image through javascript/JQuery?
    -1TC

    #332774

    @1thinchip,

    I’ve found this online topic that might be helpful: http://stackoverflow.com/questions/1002934/jquery-x-y-document-coordinates-of-dom-object

    #332779

    Unknown Author
    Participant

    That’s not working for some reason. This code, below, always displays “0,0”…

    
    
    var posx = $("#m1-Page-image2").offset().left;
    var posy = $("#m1-Page-image2").offset().top;
    alert(posx+","+posy);
    
    

    How do I access the x-y position data that is in the Properties tab in Design Center? It’s that position I need to change based on list size.

    #332839

    @1thinchip,

    Try with next snippets:

    $(“#m1-list-image1”).css(“top”,100);

    $(“#m1-list-image1”).css(“left”,100);

    #332889

    Unknown Author
    Participant

    Well, I’ve had partial sucess. I’ve got the following code working, but only in the postPageTransition function – so the user sees the image jump. Not cool. If I try it in prePageTransition, the image shrinks to one or two pixels in size. How can I get this working in the prePageTransition once the list is made?

    
    var NewHt=panelHt-180;
    $("#m1-page-image2").css("top",(parseInt(NewHt,10))+'px');
    $("#m1-page-image2").css("left","56px");
    $("#m1-page-image2").css("height","32px");
    $("#m1-page-image2").css("line-height","32px");
    $("#m1-page-image2").css("width","208px");
    
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Dynamically place image after custom list?

You must be logged in to post in the forum log in