Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabbar Change #49

Closed
camti opened this issue Apr 18, 2011 · 7 comments
Closed

Tabbar Change #49

camti opened this issue Apr 18, 2011 · 7 comments

Comments

@camti
Copy link

camti commented Apr 18, 2011

Hi,

If I was to click on the Tabbar it changes to the current selected tab, however, If i was to link to this page from another link, for example in the main content, it doesn't change the tab.

For example, If I click on the Contact Us tab, if will show Contact Us as selected. However, If i included a separate link in on of my div's that said Contact Us, it would take you to the same div, but it wouldn't update the tabbar.

Hope you can understand this?

Thanks.
Camti.

@DataZombies
Copy link
Owner

I understand your need. I'm rewriting the tabbar tap handler. I'll see if I can work this in.

@camti
Copy link
Author

camti commented Apr 18, 2011

thank you so much.

@camti camti closed this as completed Apr 18, 2011
@camti camti reopened this Apr 18, 2011
@camti
Copy link
Author

camti commented Apr 18, 2011

did not mean to close!

@DataZombies
Copy link
Owner

Don't worry, I won't forget this.

DataZombies
Beaver, Pennsylvania, USA
DataZombies@gmail.com

The information contained in this e-mail may be confidential and is
intended solely for the use of the named addressee. Access, copying or
re-use of the e-mail or any information contained therein by any other
person is not authorized. If you are not the intended recipient please
notify us immediately by returning the e-mail to the originator.

On Apr 18, 2011, at 7:52 PM, camti wrote:

did not mean to close!

Reply to this email directly or view it on GitHub:
#49 (comment)

@DataZombies
Copy link
Owner

I can't think of an efficient way to do what you want. You can, though, change the state of the tab yourself. each tab is enumerated from left to right starting with tab_0. If you have five tabs and you want to turn off tab_3 and turn on tab_4 you'd do something like this:
$('#tab_3').removeClass('enabled');
$'#tab_4').addClass('enabled');
you could attache that to your click event handler.

@camti
Copy link
Author

camti commented Apr 21, 2011

Hi there,

thanks for your response, I have done this for my href's and this has worked brilliantly, thank you.

However, I have my app save the page that the user is on, is there any way to call that function in the document ready? I have tried but to no avail. The code is correct, but it doesn't change my tab.

Thanks,
Camti.

@DataZombies
Copy link
Owner

Find the active tab's ID and save the it in the same place you save the page. On app launch check the tabbar's visibility and wait until it's not hidden. Then enable the right tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants