jQuery Mobile transistions on individual elements pagebefore change and page change



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 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 - rebuilding UL on page change?
Coding

I need to build a list in jQM which dynamically adjusts the number of items shown based on available space - I don't want any vertical scrolling on this particular page - so if only enough vertical space is available to accommodate 5 items this is what I generate.


If there is a few pixels remaining I will spread those pixels evenly among the individual list items so the control fits the screen just as a native control might.


I have figured out how to obtain the height of LI element plus any additional space consumed by toolbars etc.


I need to know how or when I should re-generate this content???


http://jquerym

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

Change page like jQuery mobile with animation?
Coding

It is posible to change the URL in the location bar and load the new page with a animation like in jQuery mobile framework.


How?


Jquery mobile change page with pagecontainer
Coding

I discover that the change() function is deprecated and, because of this, I have to use the pagecontainer function with the following reference: http://api.jquerymobile.com/pagecontainer/#method-change . However I don't understand why it does nothing and also it doesn't give me any errors in the console. I have an html page with the following structure:

<html>

  <head> ...  </head>  

  <body>

    ... 

    <div data-role="page" id="main-page" class="ui-page">

        <div data-role="header" data-position="fixed"
data-fullscreen="true" class="ui-header">

        </div>

        <div data-role="main" class="ui-content">
            ...
        </div>

        ... 
            
    </div>

    <div id="page-form-title" data-role="page">
        <div data-role="main">
            ...
        </div>
    </div>

  </body>

</html

>

I try to change the page with this code:

$.mobile.pagecontainer("change", "#page-form-title" );

Any idea? The only error I have is that jquery doesn't find an ajax-loader.gif file. I read online that is a jquery mobile's bug.


jQuery Mobile Change body background image on page change
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.



Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .