Skip to content

Instantly share code, notes, and snippets.

@guoxiangke
Created May 22, 2014 02:59
Show Gist options
  • Save guoxiangke/651d1918e325b295e761 to your computer and use it in GitHub Desktop.
Save guoxiangke/651d1918e325b295e761 to your computer and use it in GitHub Desktop.
js弹出层
<div class="contact_card" id="contact_card_guo" style="display:none; position:relative; z-index:99999;">
<div class="box" id="guo-hide">
<div id="guo-show">
<p><b class="f20"><?php print t("You need to be logged in order to submit your enquiry.");?></b></p>
<div class="btn_login"><a href="<?php print url('user/register');?>" class="btn_orange"><?php print t('Sign up, it\'s free');?></a></div>
<div class="btn_login"><a href="#TB_inline?height=360&width=420&inlineId=loginbox" class="btn_orange thickbox"><?php print t('Login');?></a></div>
<div id="contact_card_guo_close"><a href="#" id="TB_closeWindowButton">close</a></div>
</div>
</div>
</div>
<div class="bgblank" style="display:none; position:fixed;left:0;top:0;width:100%;height:100%; z-index:9999;background:#000;"></div>
<script type="text/javascript">
$(document).ready(function(){
$("#contact_card_guo_close").click(function(){
$(this).hide();
$(".bgblank").hide();
});
})
$(document).ready(function(){jQuery("#contact_card_guo").slideDown(); $("#edit-draft").attr("disabled","disabled").addClass("disabled");
$(".bgblank").show().css("opacity","0.6");
$("#guo-hide").css("opacity","0");
$("#guo-hide").animate({opacity:1},1000);
$(".bgblank").click(function(){
$(this).hide();
})});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment