Skip to content

Mobile platforms much more responsive #155

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Mobile platforms much more responsive #155

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 24, 2013

Previously took over a second to switch tabs, now is more or less instant.

Also commented out active tab class propagation to children. If you want that back, uncomment lines 466, 467, and the end of 592.

Asrael added 2 commits December 24, 2013 02:11
Mobile platforms don't click, they use touch events, and through some complicated mess of jQuery, no doubt, they're translated to clicks. The problem is that that takes a very long time.

I bound the tab click handler to 'touchend' as well, and if it ever receives a touchend event it unbinds the click event so that the function isn't run twice.

I'm almost certain there's a better way to do this.

Additionally, I commented out the portion that propagated the active tab class to the li's children, on line 466, 467, and the end of 592.

It's true that the li>a selector doesn't perform as well, but I don't think that the small speedup is worth it compared to using yet another class, especially considering that the selector doesn't need to traverse a complex structure to find li>a, that's the only element li holds usually. 

If you do want that, uncomment 466, 467, end of 592.
Just a minify of the real one.
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

Successfully merging this pull request may close these issues.

0 participants