afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
Have been fighting Opera, trying to make it understand that I need the tab and enter keys for autocomplete. Lots of googling later, finally realized that I could ignore all the talk of trying to bind to the keypress event or whatever, and instead use the existing hooks to set a "just completed" flag, after an item has been selected. Then, if the form gets submitted by the enter key, or if we leave the text box, check whether we'd just completed something.

It sounds horribly complicated, but it's only three tiny chunks of code (or it was, after I got rid of all the other more complicated, but unnecessary, approaches \o/)

Really useful article about jquery ui widgets:
* Understanding jQuery UI widgets: A tutorial was crucial to my understanding of events in jQuery.

Also, jsFiddle is awesome. It's a combination of pastebin and an active dev environment. I talk about it a bit in the [community profile] javascript community, but really it's much better than I can make it sound *g*

(A couple of weeks ago, I posted a link to Google Playground. This is like that, but even niftier if you just want to play with JS and JS frameworks, not Google's APIs).


Friday, March 19th, 2010 06:50 pm
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
Some useful places to start if you want to find out about jQuery:

7 Amazing Presentation Slides to Teach you How to Code with jQuery

15 Resources To Get You Started With jQuery From Scratch

And if you don't want to bother with setting up an HTML testbed (I know I was too lazy to!), a quick way to get started playing while going through the slides is the jQuery section of the Google Code Playground.

For example, replace the OnLoad function there with this:
sample code )