So, anyone here ever worked with the Javascript plugin jQuery?
I've worked with it a fair bit, although I'm hardly ninja-grade. What up?
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
So, anyone here ever worked with the Javascript plugin jQuery?
I've worked with it a fair bit, although I'm hardly ninja-grade. What up?
Well, I just solved my most recent problem with the jQuery autocomplete function.
I don't suppose you know how to hide the iPhone keyboard in Safari when a textbox has the focus? I mean, without disabling the text box or shifting the focus off it. (I'm using the jQuery autocomplete on the text box, so I don't need the keyboard.)
eta: My boss hates the iPhone Safari scroll thing you get for a web dropdown box.
Sorry, can't help much on that one - showing/hiding the keyboard is more in the land of iOS stuff than jQ, and I'm not sure I've ever seen a trigger for it that isn't giving/removing focus. (There are a couple of suggestions along those lines here, using blur events or dummy elements: [link] Out of curiousity, what's the use case for not shifting focus while never typing in it?
btw, are you using jQuery Mobile, or just jQuery? They're different beasties; you might want to keep your searches to jQ Mobile since you're looking specifically for iOS events.
(edit: xpost on the use case. Sigh, bosses.)
Have you seen Chosen? It's a jQ plugin that de-uglifies long ugly dropdown type things quite nicely. Disclaimer is that I have no idea what it does on mobile.
btw, are you using jQuery Mobile
No, because I did not know there was such a thing.
Thanks, gonna check it out....
Yeah, jQM is nice for handling a lot of mobile native interface stuff, and it works cross-platform, too.
I just checked the Chosen site on iPhone, and it looks a hell of a lot better than the native controls. You might just want to show him that and see what he thinks. But the basic problem is that he's trying to force UI elements to do something different than what they should really do -- a textbox is FOR ENTERING TEXT, not selecting from a pre-set list, dangit!!
t /preaching-to-the-choir
Have you seen Chosen?
Nope. Interesting. I tried a different jQ thing for drowdown box autocomplete (the built-in one, not a plugin) but I had problems with it. We also have a home-grown solution for dropdown box autocomplete, but it's customized for a different application. (Years ago, a client wanted a web dowpdown box that worked just like an Access Combobox.)
a textbox is FOR ENTERING TEXT, not selecting from a pre-set list, dangit!!
Yeah. 'Cept we have some dropdown boxes with thousands of items in them, so the scroll wheel on the iPhone doesn't work as well without some sort of type-ahead functionality.
Seriously. This sounds more and more like Chosen, and it's bee-you-tee-ful, and handles multiselects (and deleting some of your multiselects! It's a brave new world!!) much more nicely than any system's native controls.
I just checked the Chosen site on iPhone, and it looks a hell of a lot better than the native controls. You might just want to show him that and see what he thinks.
Yep, my boss was impressed, so I'm going to try some Chosen dropdown boxes.
We're just doing a demo for a client. My boss says this is a learning experience, and it's OK if I want to throw away the last week's work and start over with new tools.
Anyway, I'm having fun learning this stuff.