zepto自定义事件

<!--测试自定义事件 trigger-->
<script>
    $(function () {
        var meEvent = $.Event("custom");
        $("body").on("custom",function () {
            console.log("test custom");
        })
        $("#testBtn").on("click",function () {
            $("body").trigger("custom");
        })
    })
</script>

  

posted @ 2016-09-08 18:57  阳子杰  阅读(427)  评论(0编辑  收藏  举报