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

#tabbar fades in #83

Closed saulposel closed 12 years ago

saulposel commented 12 years ago

Firstly, thanks for all your hard work... it's truly amazing!

I noticed that the #tabbar fades in. I wanted to stop this, so scoured the code couldn't find anything.

I posted on the jQTouch google group, but decided to come back to this again and see if I could find what was causing it.

Hopefully I can be helpful as I have now found what is causing the issue (and, if it doesn't sound cheeky, it doesn't seem to be intentionally coded to animate):

The animated fade in is due to the way that the JQuery .show() function is being called in jqt.bars.js: line 632:

$('#tabbar').show(function () { 
_debug('initTabbar hide tabbar'); 
setPageHeight(); 
setBarWidth(); 
}); 

JQuery's API says that the function is either:

.show() 

or

.show( duration [, callback] )

As line 362 only uses one variable when calling the .show() function, JQuery assumes that it is using the function to determine how long to take to show the #tabbar. By changing line 362 to the following, it all works...

$('#tabbar').show(0,function () {

Anyway, thanks again to jQTouch and datazombies! Loving all your hard work.

DataZombies commented 12 years ago

I tested it and, you're right. I needed the "0, ". I've updated the code.

Thanks!

saulposel commented 12 years ago

woo!

happy I could help and, in a very small way, contribute.

Thanks again for all the hard work