5 ms·
Nice work. I work in mobile web and I applaud the simplicity and speed. That said, to really make it snappy, bind to 'touchstart' instead of 'click' --- or impl
by jbail 15y ago
Nice work. I work in mobile web and I applaud the simplicity and speed. That said, to really make it snappy, bind to 'touchstart' instead of 'click' --- or implement a 'tap' event.
Also, I might go a couple font sizes larger. It's readable, but small on my phone.
All in all though, it's pretty nice. It's a good example of what mobile web can do and showcases the power of client side development when you have an API to support it.
- JoelSutherland 15y agoWhich phone out of curiosity? I was actually thinking of knocking the font size down a bit! There must be some inconsistency I can fix. It's fast because I didn't both with a mobile web framework. I've found those (especially jQuery mobile with its DOM caching) to perform horribly. This should scroll as quickly and smoothly as your phone can.
- bgarbiak 15y agoOn iPhone 4 all fonts are ok (please, don't size them down) except for the ones on sliding out, black panels - these are a bit too small.
- jbail 15y agoI'm on an EVO using Dolphin Browser. ...and you're totally right about jQuery Mobile causing suckage. I used it for a couple features and I'm now ripping it out in favor of a little handrolled solution I built. I even replaced the jQuery core library with XUI because it's even smaller has most of the goodies I use 99% of the time. For everything XUI doesn't have, I really like XUI.extends in its simplicity better than the jQuery plugin architecture. Super easy to add whatever else you need. Performance is night and day better now.
- johnbender 15y agoCurious what issues you had with jqm. We're always looking for feedback.
- johnbender 15y agoYou can steal most of this stuff out of jqm, if you grab the events and vmouse plugins. Month's worth of work to speed up clicks and simplify the way you bind to events in the page. [edit] jbail means to say there's a 200ms (or so) delay from touchstart to when click is fired in mobile browsers. He's obviously relatively experienced with mobile web dev :)
- JoelSutherland 15y agoThanks -- I just made some changes and iOS and Android are now firing on touchstart. Additionally I cut the slide in animation time by 50%. It feels much snappier! I also added a back button so it can more easily be run fullscreen.
- johnbender 15y agokeep in mind touchstart is fired in swipes as well so binding to touchstart only could have unintended consequences. Like I said there's a lot to consider when it comes to solving the click issue on mobile.