Cheers, comrades! We meet the new version of jQuery and we are happy that the developers of this wonderful javascript library are still intensively developing and promoting their offspring! We did not have time to get used to jQuery 1.4, as a new release was rolled up.
In jQuery 1.4.1, we fixed several bugs that appeared in version 1.4 and worked on the API for the glory.
2. And now I suggest to get acquainted with the innovations:
It occurred to the developers that their initial idea was to call the events “blur” and “focus” (loss and getting html elements in the focus) with new names, namely “focusin” and “focusout”, maybe it was not so good, so now in the method .live () we can use the first option (“focusin” and “focusout” naturally have not gone away for backward compatibility purposes).
The same situation with the events "mouseenter", "mouseleave". Now besides them in the .live () method you can also use the “hover” method
For the .live () method, you can now specify several types of events, as well as for .bind (). An example of how this can be useful:
Once again, rational thinking was visited by the creators of jQuery, when they took a closer look at the .die () method. Well, or good developers send them the right tickets to the bug tracker :) Originally intended to remove event handlers assigned using the .live () method, now the .die () function can delete them all if called without parameters (t . e. you do not need to pass into it the type of event for which you want to remove handlers).
Now the .height () and .width () methods can be passed as a parameter to a function that will set the height / width accordingly.
The functions .parseJSON () (parsing the JSON string in the javascript object) and .error () (the single error output mechanism is good) are now available to everyone (previously used only inside jQuery), which is quite logical, as for me.
A lot of bugs have been fixed, but I will not dwell on them in detail, we read about it here (in English).
Thanks for attention. We are not lazy, we update jQuery in our projects;)