Dynamic content #5

Closed
alexandremblah opened this Issue Apr 24, 2012 · 5 comments

5 participants

@alexandremblah

If I inject dynamic content, the fixed toolbar doesn't work anymore, perheps some "update" method might work. Tks

@scottjehl scottjehl pushed a commit that closed this issue Apr 24, 2012
scottjehl exposed the updatePosition method. If you add or remove content in th…
…e page, you can call this method to reset the toolbar's positioning. This is mostly applicable to footers. Fixes #5
164b6f0
@scottjehl scottjehl closed this in 164b6f0 Apr 24, 2012
@alexandremblah

It didn't work, message: "Uncaught TypeError: Object [object Object] has no method 'fixedToolbar'".

@WallTearer

I have the same problem.
I'm binding to the "scrollstop" event:

$( document ).bind( "scrollstop", function( event, data ){
    $( ".ui-footer-fixed" ).fixedtoolbar( "updatePosition" );
});

And I see the following error in console:

uncaught exception: no such method 'updatePosition' for fixedtoolbar widget instance
@keab42

I'm binding to pageshow and I'm seeing exactly the same error.

@yciabaud

I had this error on a browser supporting position:fixed. I had to add a condition before calling updatePosition:

if($.mobile.fixedtoolbar.prototype.options.supportBlacklist() && $.support.scrollTop )  {
    $(".ui-footer-fixed" ).fixedtoolbar( "updatePosition" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment