cssmagic/action js

action js 关键点

var $wrapper = $(document.body || document.documentElement)

$wrapper.on('click','[data-action]',function(ev){
       ev.preventDefault();
       var $elem = $(this);
       var actionName = elem.data('action');
       fn =    _actionList[actionName];
       fn.call();
})        

  

posted on 2014-12-24 14:35  圆儿圈圈  阅读(103)  评论(0编辑  收藏  举报