Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Screen name:
Rodelio Rodriguez
Rodelio Rodriguez's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Ideas
Problems
Expanded view
List view
Private Message
Change background image dynamically
[2Replies]
26-Apr-2018 01:20 AM
Forum:
jQuery Mobile
I'm new to jquery mobile and I have a need to change the background image dynamically. I tried the following codes but none is working.
//$('.ui-page').css('background-image', "url(img/background2.jpg) no-repeat center center fixed;");
//$('#index .ui-page').css('background-image', "url(img/background2.jpg) no-repeat center center fixed;");
$('body').css('background-image', "url(img/background2.jpg) no-repeat center center fixed;");
//$('#rodeliox').css('background-image', "url(img/background2.jpg) no-repeat center center fixed;");
//$('.ui-page').removeClass().addClass('.ui-page.bg2');
//document.getElementById("rodeliox").style.backgroundImage = "url(img/background2.jpg) no-repeat center center fixed;";
$('#index').trigger('pagecreate');
alert("test");
This is the css that I used to set the background image.
#index.ui-page{
background: url(img/background.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-size:100% 100%;
}
Can anyone help me? Thank you so much!
«Prev
Next »
Moderate user : Rodelio Rodriguez
Forum