Recently in jQuery Category

jQuery 1.2.6

| | Comments (0) | TrackBacks (0)

A couple weeks ago, the jQuery team released jquery 1.2.6.

jQuery is the write-once, run-anywhere a new type of javascript library.

It's incredibly full of win. Favorite things in 1.2.6:

  • Still small (minified+gzipped, 15k)
  • Dimensions plugin - I can see why. Dimensions was a godsend, providing totally important calls like $.position() and $.innerHeight() and whatnot. Indispensible.
  • makeArray - jQuery's internal .makeArray() method now converts any array-like object into a new array. Additionally it wraps all other objects as an array and returns the resulting set. This one is so wild, it will require further digestion, but there are plenty of possibilities

I'm working on a brief introductions to jQuery I will post to go over a bunch of basic techniques; things that go a tiny bit beyond the jquery.com documentation usage.

When you send a request via $.ajax, $.get, or $.post in jquery, you can test for the HTTP_X_REQUESTED_WITH header, looking for a value of 'XMLHttpRequest', a la:

function isajax() { return ((!empty($_SERVER['HTTP_X_REQUESTED_WITH'])) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'); }

But what happens when you're using the jQuery Form plugin? Normally, things work fine. Below the cut for a serious caveat!

Today I had the opportunity to play with event bubbling and applying generic event handlers. Quick overview on handling them (with jquery!) and which events cannot be cancelled.

June 2008

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Creative Commons License
This weblog is licensed under a Creative Commons License.