1
我正在使用jquery在我的页面上实现事件委托。我定义为顶级元素的单击处理程序,而只是想要做的事“定制”如果点击某个下跌类的元素:从我的自定义点击处理程序调用默认事件处理程序?
$("#myDivWithManyLinks").click(function(e){
var target = $(e.target);
if (target.hasClass('myClass123')
{
// do my "custom thing"
return false;
}
else
{
// XXX let the click be handled by the click handler that would otherwise get it
}
我该怎么办“XXX”?
感谢您的帮助,
拉拉
你这是什么意思是“我怎么做XXX”?如果目标没有class myClass123,则XXX将运行。 – David 2010-01-06 19:31:55