$("button:first").click(function(e,buttonName){},这个语句里的function(e,buttonName),e是event object,那buttonName是什么类型的参数?
<h2>自定义事件trigger</h2>
<div class="left">
<div>
<span></span>
<span>0</span>
点击次数
</div>
<button>直接点击</button>
<button>通过自定义点击</button>
</div>
<script type="text/javascript">
n=0;
$("button:first").click(function(e,buttonName){
buttonName = buttonName||'first';
update(buttonName);
});
$("button:last").click(function(){
$("button:first").trigger('click','last');
});
function update(buttonName){
$("span:first").text(buttonName);
$("span:last").text(++n);
}
</script>