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

jQuery

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 )
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
The support requests status tracker script used to hang at around 300 total requests modified (or once around a hundred requests moved off the board.) Today, it processed "525 updated and 483 moved off this view for a total of 1008 requests changed" in an instant.

The changes I made to the code have worked out much better than I ever planned :-) Of course, the real problem was that earlier versions of the code were complete and utter crap. See, I made a couple of embarrassing rookie mistakes with arrays and string handling )

Note: pseudocode is because I'm too lazy to remember how I actually coded it in old versions. Real code is because I'm too lazy to figure out how to convert my current code to pseudocode.