SDpower

jQuery

jQuery 1.4 研究與報導 之個人見解(二)

by on 一月.20, 2010, under jQuery

New .toArray() method

.get()用來轉換陣列,將被移除.
jQuery1.4 請使用.toArray() 不用帶入參數可以自動解析.

jQuery() returns empty set

在舊版jQuery1.3 jQuery() 會回傳整個結構函數.
jQuery1.4 將改善此現象 回傳一個空函數.
PS:保留jQuery().ready() 和 jQuery(function(){}).

jQuery(“TAG”)

快數透過TAG目標定義選取.

CSS

The performance of the .css() method has seen a 2x performance improvement.
.css()速度大幅增長2倍,請看官方圖表.

The performance of the .addClass(), .removeClass(), and .hasClass() methods has seen a 3x performance improvement.
.addClass().removeClass().hasClass()速度大幅增長3倍,請看官方圖表.
(continue reading…)

Fork me on GitHub
Leave a Comment more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!