浏览:938 2008-06-18 14:53 来自 天梦      :
性能提升我就不说了, 这可以查看

1、整合了Dimensions Plugin插件

2、消除.attr()方法的15个明显错误并优化了该方法

3、.toggle()方法中现在可以地增加了不止两个方法如:     

$("div").toggle(function(){
    $(this).removeClass("three").addClass("one");
}, function(){
    $(this).removeClass("one").addClass("two");
}, function(){
    $(this).removeClass("two").addClass("three");
});
4、可以对toggle()和one()方法进行解除绑定
function test(){ $(this).addClass("test"); }
$("div").one("click", test);
$("div").unbind("click", test);

$("div").toggle(test, test);
$("div").unbind("click", test);

5、index()现在可用于检索一个jQuery对像在集合中的索引
var test = $("div.test");
$("div").index( test ) == 3

6、makeArray()可以把任何对像转换为数组
jQuery.makeArray( document.getElementsByTagName("div") )
// => [ div, div, div ]

jQuery.makeArray( true )
// => [ true ]

jQuery.makeArray()
// => []
7、beforeSend 的使用可以在ajax调用之前处理一些代码来决定是否进行ajax调用
$.ajax({
  beforeSend: function(){
    return $("#input").val() == "";
  },
  url: "test.php"
});


8、公开速度对像,可以通过更改jQuery.fx.speeds对像来对覆盖默认值,也可以新添自已的速度常数。

jQuery.fx.speeds.slow = 1000;
$("#test").slideDown("slow");
收藏 楼主
  3个月前  红尘中迷茫      :
谢谢分享!
1楼 回到顶楼 
  3个月前  @@      :
谢谢楼主!
2楼 回到顶楼 
  2个月前  無尽海      :
真有提升这么多吗,怎么没有ie6的数据
3楼 回到顶楼 
  2个月前  Traveler      :
4楼 回到顶楼 

注册用户登录后才能回复,登录注册
> 返回“jQuery”


其他话题

相关内容

相关链接

1 11851