River: They weren't cows inside. They were waiting to be, but they forgot. Now they see the sky and they remember what they are. Mal: Is it bad that what she said made perfect sense to me?

'Safe'


Buffistechnology 3: "Press Some Buttons, See What Happens."

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!


tommyrot - May 03, 2012 6:29:36 am PDT #19965 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

So, anyone here ever worked with the Javascript plugin jQuery?

Because I may have questions.


amych - May 03, 2012 6:51:33 am PDT #19966 of 25501
Now let us crush something soft and watch it fountain blood. That is a girlish thing to want to do, yes?

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?


tommyrot - May 03, 2012 7:18:17 am PDT #19967 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.


amych - May 03, 2012 7:31:25 am PDT #19968 of 25501
Now let us crush something soft and watch it fountain blood. That is a girlish thing to want to do, yes?

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.)


amych - May 03, 2012 7:34:30 am PDT #19969 of 25501
Now let us crush something soft and watch it fountain blood. That is a girlish thing to want to do, yes?

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.


tommyrot - May 03, 2012 7:35:26 am PDT #19970 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

btw, are you using jQuery Mobile

No, because I did not know there was such a thing.

Thanks, gonna check it out....


amych - May 03, 2012 7:38:48 am PDT #19971 of 25501
Now let us crush something soft and watch it fountain blood. That is a girlish thing to want to do, yes?

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


tommyrot - May 03, 2012 7:40:07 am PDT #19972 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.)


tommyrot - May 03, 2012 7:41:51 am PDT #19973 of 25501
Sir, it's not an offence to let your cat eat your bacon. Okay? And we don't arrest cats, I'm very sorry.

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.


amych - May 03, 2012 7:43:29 am PDT #19974 of 25501
Now let us crush something soft and watch it fountain blood. That is a girlish thing to want to do, yes?

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.