DataZombies / jQTouch

jQT extensions jqt.activityIndicator, jqt.bars (with numeric badges), jqt.checkGroup & jqt.segmentedControl.Get updates via Twitter http://twitter.com/HeadDZombie. If you find this fork useful please make a donation via PayPal (http://tinyurl.com/2fpmx27). See below for demo links.
MIT License
159 stars 34 forks source link

How to hide tab bar on first screen and show over second screen #80

Closed vikasnawal closed 12 years ago

vikasnawal commented 12 years ago

I am developing an app,it contains one login form and other screen.I want to show tabbar on second screen not to the first screen but it is showing over first screen too.so how can i hide the tab bar from first screen.PLease ket me know how can i do that.

Thanks,

vikasnawal commented 12 years ago

Hi,

I have a webpage using jQTouch and the jqt.tabs sucessfully so far. Now that I want to configure the tabbar automatically I am running into the issue that I can't add or delete items to it on diffrent div or screen

My page (index.html) contains default 5 other tabs This works perfectly. But i dont want that tabs on my first screen

I have tried jQT.setPageHeight() but it does not do anything. When I look in the error console I do not see any errors.

Any hints for hiding the tabbar from first div or screen and show the tabbar on all other screen that I have set ?

DataZombies commented 12 years ago

Try putting the hide_tabbar class on the login page.

vikasnawal commented 12 years ago

I have tried with that.But still tabbar does not hide form login page.Is there any other way to achieve it.

DataZombies commented 12 years ago

Try this then. Find the following lines in ./extensions/jqt.bars/jqt.bars.js.

// Show tabbar now that it's been built, maybe
if (!$('.current').hasClass('hide_tabbar')) {
  $('#tabbar').show(function () {
    _debug('initTabbar hide tabbar');
    setPageHeight();
    setBarWidth();
  });
} else {
  _debug('initTabbar show tabbar');
  setPageHeight();
  setBarWidth();
}

Change it to this

// Show tabbar now that it's been built, maybe
if (!$('.current').hasClass('hide_tabbar')) {
  if ($('.current').attr('id') !== $('#LOGIN_PAGE_ID')){
    $('#tabbar').show(function () {
      _debug('initTabbar hide tabbar');
      setPageHeight();
      setBarWidth();
    });
  }
} else {
  _debug('initTabbar show tabbar');
  setPageHeight();
  setBarWidth();
}

This will check to see if the div with the current class is the login page by comparing the IDs.

vikasnawal commented 12 years ago

Thanks a lot.. It really works for me ......