Skip to content

Instantly share code, notes, and snippets.

@turbotree
Created August 13, 2014 11:08
Show Gist options
  • Save turbotree/24cc5e71fbd3b308fca9 to your computer and use it in GitHub Desktop.
Save turbotree/24cc5e71fbd3b308fca9 to your computer and use it in GitHub Desktop.
点击一个body隐藏块
var run = true;
function aa(){
run = false;
}
$("body").click(function(){
if(run){
$("#cancel").hide();
$("#fahuo").hide();
$("#qianshou").hide();
$("#bzalert").hide();
}
run = true;
})
$(".cancelbtn").click(function(){
run=false;
}
html:
<div tabindex='-1' id = "cancel" class="popover left" style="display: none; top: 156px; left: 743px;" onclick="aa();"><div class="arrow"></div>
<div class="popover-inner popover-memo">
<div class="popover-content">
<form class="form-inline">
<span style="font-size: 13px;">确定取消? &nbsp;&nbsp;</span>
<button type="button" class="btn btn-primary js-btn-confirm btn-sm tookbtn" data-loading-text="confirm">确定</button>
<button type="reset" class="btn btn-default js-btn-cancel btn-sm tocancelbtn">取消</button>
</form>
</div>
</div>
</div>
<a class="cancelbtn btn btn-warning btn-sm" rel="popover" href="javascript:;" style="font-size:10px;" orderid="${order.id}">取消订单</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment