facebook

Resizing background image: CLOSED

💡
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 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #332573 Reply

    arc-itech
    Participant

    Hi I am trying to dynamically add a background image that changes on the orientation

    I have used this code:
    phoneui.postOrientationChange = function(newOrientation) {
    if(newOrientation==-90||newOrientation==90){
    $(‘#m1-index’).css(‘background-image’, ‘url(“images/bg_landscape.png”)’);

    }
    else{
    $(‘#m1-index’).css(‘background-image’, ‘url(“images/bg.png”)’);

    }
    }

    However the images stretches out so i can only see a small portion of it, is my code wrong?

    #332576

    Hi arc-itech,

    Your code seems to be fine. I suspect that the size of your images are incorrect, could you share its dimensions?

    #332626

    arc-itech
    Participant

    great thanks, got it working now

    #332698

    @arc-itech,

    Thanks for report that you have it working. Marking thread as closed.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Resizing background image: CLOSED

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