jQuery Mobile transistions on individual elements pagebefore change and page change


Tristan
HOME ยป Coding

So, I am using jQuery Mobile and I'd like to animate individual elements on a page change both before and after the change. I set transitions to "none" in jQuery moblie then try to add class to css3 animate individual elements. It works on pagechange, so when you go to a new page the transition on the elements appears, but pagebeforechange happens to quickly and the animation is lost. Is there a way to make the pagebeforechange function wait until the animation is done then go on to the next page? preventDefault(); stops the page from changing at all. I need like a call back or deferred obj or something? If I call changepage in pagebeforechange after the animation is done...the function r


Related to : jQuery Mobile transistions on individual elements pagebefore change and page change
jQuery Mobile transistions on individual elements pagebefore change and page change
Coding

So, I am using jQuery Mobile and I'd like to animate individual elements on a page change both before and after the change. I set transitions to "none" in jQuery moblie then try to add class to css3 animate individual elements. It works on pagechange, so when you go to a new page the transition on the elements appears, but pagebeforechange happens to quickly and the animation is lost. Is there a way to make the pagebeforechange function wait until the animation is done then go on to the next page? preventDefault(); stops the page from changing at all. I need like a call back or deferred obj or something? If I call changepage in pagebeforechange after the animation is done...the function r

jQuery Mobile Change body background image on page change
16/12/2014 9:40 pm Coding

I have the following scenario, two pages with different body id. This is for setting a different background on each body. However when I navigate to page2 from page1 the background keeps being the same. Is there a way to set a background image on page change ??

PAGE1:

HTML:
<body>
   ...html content
</body>

PAGE 2:

HTML:
<body id="myOtherBg" >
   ...html content
</body>

CSS:

 body{
        background: url(../img/background_white.png) center center
no-repeat;
    }

    #myOtherBg{
        background: url(../img/background_white.png) center center
no-repeat;
    }

This works on a normal page load, but when reaching the page2 from page1 using jquerymobile the background doesn't change.

Any help would be appreciated, thanks in advance.


Jquery mobile change page to itself
Coding

I have a website built with jquery mobile(Single page).


I have something like a wizard: e.g. search -> select -> select -> search -> menu -> search -> search. Basically here are only three pages, but i need to change some of them to itself, like search to search, so it will be in a history and to rise a pageshow event etc...


How can i do it?


$.mobile.changePage("#page1");

doesn't work in this case: here is an example to playaround.


jquery mobile change page with page transition from javascript
Coding

I am doing transitions with the help of this page: http://jquerymobile.com/demos/1.2.0/docs/pages/page-transitions.html


I do a transition when clicking on the link:


<a href="#page1" data-transition="slide" data-role="button" > Submit </a>

That makes a slide transition.


If I where to change data-transition attribute to data-transition="none" I will get no transition.


Now I will like to do some logic before doing the transition. In other words it will be nice if I could perform the same transition with javascript. This is what I have right now:




HD Wallpapers
3D
3D Abstract
City
Celebrities
Indian Celebrities
Cars
Travel
Girls
Animals Birds
Movies
Sports
Black White
Nature
Planes
Anime
Food Drink
Dreamy Fantasy
Architecture
Games
Space
Holidays
Flowers
Love
Artistic
Baby
Beach
Bikes Motorcycles
Macro
Computers
Vector
Funny
Army
Textures
Brands
Misc
Music
Other
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .