<li style="display: none">1</li><li >2</li><li style="display: none">3</li><li >4</li><li >5</li><li >6</li><li >7</li><a onclick="v()">更多</a> script:function v(){if($("a").html()=="更多"){$("ul li:lt(3)").show();$("a").html("简化");}else{$("ul li:lt(2)").hide();$("a").html("更多");}}
看完会有收获的 http://blog.csdn.net/u014492334/article/details/51910271
2016-07-17
jq1.4后也可以这么写
$("#btntest").bind({
click: function() {
// do something on click
},
mouseout: function() {
// do something on mouseenter
}
});
$("#btntest").bind({
click: function() {
// do something on click
},
mouseout: function() {
// do something on mouseenter
}
});
2016-07-16
$("#btntest").attr("disabled","true");
2016-07-16