Archive for February, 2007

jQuery 1.1.2 Released

Tuesday, February 27th, 2007

The jQuery project team has just released version 1.1.2 of the JavaScript library. This is a bug-fix version, recommended for everyone. If you are still using a version prior to 1.1, you should be mindful of the API changes (see the jQuery 1.1 announcement for details). If you’re already using version 1.1 or later, you’re in good shape.

Here are the “new and noteworthy” updates from version 1.1 to version 1.2, as noted in the Change Log:

  • Changed: Event handlers (like element.onclick) are now removed when no more functions are bound to the event.
  • Fixed: DOM Manipulations for form elements.
  • Fixed: jQuery.isFunction to return false on nodes.
  • Fixed: jQuery.className.has, escaping regex characters in className (for metadata)
  • Fixed: an issue in IE where an event on a cloned element is fired during a .clone() inside of an event handler.
  • Fixed: IE ID selectors selecting by the name attribute.
  • Changed: Events are now internally stored in elem.$events rather than elem.events (due to a nasty bug relating to DOM 0 expandos).
  • Changed: .attr('href') is now consistent in all browsers.
  • Changed: @href is now consistent in all browsers.
  • Fixed: the slideDown flickering bug.
  • Fixed: Having a \r endline in $("...") caused a never-ending loop.
  • Fixed: IE6 AJAX memory leak
  • Fixed: bug in pushStack, reporting an element at [0] in a jQuery object with length 0

Download the jQuery 1.1.2 source directly, or visit the jquery.com download page.

Important Update: If you downloaded 1.1.2 between the time I originally posted this entry and now (2007-02-28T17:12:00+10:00), please download it again. There was a nasty Safari-crashing issue with the one posted last night.

Quick Tip - Set Hover Class for Anything

Saturday, February 17th, 2007

Sometimes it’s nice to be able to give users visual feedback when they hover their mouse over an element on the page. It’s easy to do, of course, with a little CSS:
#hover-demo1 p:hover { background: #ff0; }

That little style rule changes the background of any paragraph that is a descendant of an element with id="hover-demo" to a nice bright yellow — but only when you hover your mouse over it. So, if that’s all there is to it, what does this have to do with jQuery?

(more…)

More Showing, More Hiding

Thursday, February 8th, 2007

We’ve received a number of comments recently from people looking for variations on the showing and hiding theme. For the basics, you can take a look at two earlier entries, Basic Show and Hide and Slicker Show and Hide.

For a full-blown plugin solution with lots of options, look no further than Jörn Zaefferer’s Accordion Menu. But if you want to try some showing and hiding on your own, read on.

(more…)

Have Your jQuery Fun on Any Site with Greasemonkey

Friday, February 2nd, 2007

Hot on the heels of my jQuerify Bookmarklet entry and John Resig’s Hacking Digg with Firebug and jQuery entry, Joan Piedra has put together a Greasemonkey user script (Firefox only) that lets jQuery load automatically on any site that you’ve set for it in the Greasemonkey preferences dialog.
(more…)