//Change onClick to just toggle since child data will now be loaded TargetWorksheet.get_child_locations(2,1);});
因此,我将一个click事件附加到我的'+‘链接(#location-toggle在第一次单击时,我想执行一个ajax调用来检索子数据,但
jQuery提供了一个isTrigger属性,它允许我们知道事件是“真实事件”还是仅仅是“触发的”。$(ele).on("click", function(e){ // this event was only triggered, not a realevent // this was a real event })
出于单元测试的目的,有没有一种方法可以t