[jQuery] Re: closure inside ajax method

2009-01-27 Thread Andrew Hedges
The order of elements in a simple array like this is guaranteed. Looping over an object with a for in loop, the order is not guaranteed, though by convention most browsers honor the order in which the elements were added. jQuery would have to go out of its way to return the elements from your arra

[jQuery] Re: $.ajax beforeSend Accept-Encoding behavior

2009-01-25 Thread Andrew Hedges
(say, a particular MIME type or charset)? In other words, is there no way to change this? On Jan 26, 2:41 pm, Andrew Hedges wrote: > I'm trying to make an Ajax request, specifically requesting a non- > gzipped response. Here's how I am going about it: > > $.ajax({ >         u

[jQuery] $.ajax beforeSend Accept-Encoding behavior

2009-01-25 Thread Andrew Hedges
I'm trying to make an Ajax request, specifically requesting a non- gzipped response. Here's how I am going about it: $.ajax({ url : 'http://my.valid.url/', method : 'get', beforeSend : function (xhr) { xhr.setRequestHeader('Accept-Encoding', 'identity');

[jQuery] jQuery 1.3: Sweet upgrade, but can we use it?

2009-01-14 Thread Andrew Hedges
New blog post, "jQuery 1.3: Sweet upgrade, but can we use it?" here: http://tr.im/751a The gist is that I'm concerned that jQuery is progressing faster than users are upgrading their browsers, making it increasingly difficult for web developers to sell the use of the library to management and cli

[jQuery] Re: why is this code inefficient?

2008-09-24 Thread Andrew Hedges
I suggest giving jQuery a more specific context in which to search for the elements in question. If the set of elements you want is (or can be put) inside an element with an ID, that is the most efficient. Selectors like: $('#some-element .a-bunch-of-elements') ...are way faster than selectors

[jQuery] Re: best/standard way to benchmark your own scripts?

2008-09-17 Thread Andrew Hedges
Someone is bound to have a better answer than this, but to get you started with profiling, have a look at this page where I include some code to time my script execution: http://andrew.hedges.name/experiments/simple-templates-speed-test/ It wouldn't be much of a stretch to apply this same patter

[jQuery] Re: Docs down...really no mirror?

2008-09-06 Thread Andrew Hedges
I'm building a Dashboard widget. It's not quite done, but it mostly works and it doesn't need 'net access because it contains a local copy of the docs. You can find it here: http://code.google.com/p/jquery-reference/ On Sep 6, 12:11 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Until it does ..

[jQuery] Simple Templates

2008-09-03 Thread Andrew Hedges
Introducing a new jQuery plug-in, Simple Templates: http://andrew.hedges.name/blog/2008/09/03/introducing-jquery-simple-templates One thing I have missed from my Prototype days (shudder, I know!) is simple, built-in templating. I know there are other templating plugins, but I liked the Prototype

[jQuery] UK salaries

2008-08-26 Thread Andrew Hedges
Hi all, Can anyone provide guidance on ranges for salaries in the UK for experienced jQuery / JavaScript / UI programmers? Cheers, -Andrew