The incredibly popular jQuery library has released jQuery 1.4 on a new website that will celebrate 14 days of jQuery.

There are a lot of new features, and as usual performance gains are showcased.

  • Easy Setter Functions: For a while now, you’ve been able to pass a function into .attr() and the return value of that function is set into the appropriate attribute. This functionalilty has now been extended into all setter methods
  • Ajax: A lot of enhancements to the various remoting functions including support for native JSON parsing, etags, request context, and more
  • .css and .attr have been improved
  • Per property easing on effects
  • If you want to ensure that “this” inside a function will be permanently bound to a particular value, you can use jQuery.proxy to return a new function with that scope
  • New events: focusin and focusout

And Joe Walker will be really excited to see that dojo.create has made it in! :)

JAVASCRIPT:
  1.  
  2. jQuery("<div />", {
  3.     id: "foo",
  4.     css: {
  5.         height: "50px",
  6.         width: "50px",
  7.         color: "blue",
  8.         backgroundColor: "#ccc"
  9.     },
  10.     click: function() {
  11.        $(this).css("backgroundColor", "red");
  12.     }
  13. }).appendTo("body");
  14.  

Congrats to the jQuery team. I look forward to seeing posts over the next 2 weeks that go into more detail on the new coolness.


Related News :