jQuery 1.4.2

    imageJQuery was updated to version 1.4.2.
    Several bugs were fixed and a little functionality was added

    1) 2 new methods .delegate () and .undelegate () were implemented , designed to complement the .live () and .die () methods . These methods make it easy to work with some specific events.

    For example:
    $("table").delegate("td", "hover", function(){
      $(this).toggleClass("hover");
    });


    This is equivalent to the following code written using .live ():
    $("table").each(function(){
      $("td", this).live("hover", function(){
        $(this).toggleClass("hover");
      });
    });

    2) improved performance - TaskSpeed ​​test - Judging by the abundance of dark green (the fastest / baseline) in jQuery 1.4.2 graph breaks into unconditional leaders. (Although tests are not a real application, of course)
    Improved .bind () and .unbind () ( Ticket )
    call improvements in .empty (), .remove (), and .html () ( Ticket )
    improvements Improved insertion of a single DOM element to document ( Ticket , Additional Commit )
    Improved call to $ ("body") ( commit )

    jQuery Minified ( 24kb Gzipped )
    jQuery Regular (155kb)

    Changing the functionality of
    jQuery 1.4.2 Released - examples of using new features

    Also popular now: