【发布时间】:2014-01-14 07:36:18
【问题描述】:
我想在帖子推特弹出屏幕弹出时添加一个不透明的黑屏。这是我当前用于打开弹出式帖子屏幕的代码,效果很好。我只想在弹出窗口后面添加一个不透明的黑屏,然后让它在关闭弹出窗口时重新加载页面,或者在将推文发布到 Twitter 后删除黑屏。
代码:
<script>
$('.popup').click(function(event) {
var width = 575,
height = 400,
left = ($(window).width() - 575) / 2,
top = ($(window).height() - 400) / 2,
url = this.href,
opts = 'status=1' +
',width=' + width +
',height=' + height +
',top=' + top +
',left=' + left;
window.open(url, 'twitter', opts);
return false;
});
</script>
【问题讨论】:
标签: javascript jquery api twitter