通過點擊事件 e對象的target來判斷點擊的區(qū)域是哪里 然后執(zhí)行相對應(yīng)的方法
clickItem('.alertView-bg',function (e) {
? ? ? ? if(e.target == this)
? ? ? ? {
? ? ? ? ? ? $(this).css('display','none')
? ? ? ? }
? ? },true);
? ? clickItem('.cancle-btn-alone',function (e) {
? ? ? ? if(e.target == this)
? ? ? ? {
? ? ? ? ? ? alert("小崔最帥")
? ? ? ? ? ? $(this).css('display','none')
? ? ? ? }
? ? },true);