Fabian Boulegue
Fabian Boulegue

Reputation: 6608

jQuery Mobile Tabbar - Hide on Tab

i m creat a JQuery Mobile Page with a Tabbar. If i click on the content the Footer/Header disapears, how can i disbale that?

At the moment both Bars are fixed.

A quick sample would be perfect.

Upvotes: 0

Views: 1465

Answers (1)

codaniel
codaniel

Reputation: 5253

There are a couple of ways to accomplish this with JQM 1.1.0

The first and easiest was is to set data-tap-toggle="false" in your fixed toolbar

<div data-role="header" data-position="fixed" data-tap-toggle="false">

The second way I like because it allows you to disable this in every page and every fixed toolbar. This way you won't drive yourself mad typing data-tap-toggle="false" over and over.

$(document).on('pageinit','[data-role=page]', function(){
    $('[data-position=fixed]').fixedtoolbar({ tapToggle:false});
});

The following will disable the tap toggle in JQM 1.0.1

$(document).delegate('[data-role=page]','pageinit', function(){
    $.mobile.fixedToolbars.setTouchToggleEnabled(false);
});

Upvotes: 3

Related Questions