0
我正在使用jQuery和Zepto。 我想有条件地调用jQuery集合上的Zepto方法。任何人都有雄辩的解决方案?我的代码目前看起来是这样的:在jQuery集合上使用Zepto方法
// Obtain jQuery Object
var $selector = jQuery('.selector');
// Desktop
$selector.click(...);
// Mobile
if (window.Zepto){
$selector.slideLeft(...);
}
为什么不将这些Zepto方法集成到jQuery插件中? – CodeColorist 2013-03-07 01:22:26
试过...没有编辑Zepto源码就无法做到...即e.touches需要变成e.originalEvent.touches ...等等 – Globalz 2013-03-07 21:59:23