0
$(document).ready(function() {
//select all the a tag with name equal to modal
$('a[name=popup]').click(function(e) {
//Cancel the link behavior
e.preventDefault();
//Get the A tag
var id = $(this).attr('href');
//Set the popup window to center
$(id).css('top', winH/2-$(id).height()/2);
$(id).css('left', winW/2-$(id).width()/2);
可以我改变下面的一个href标记的弹出窗口(顶部:DOM + 20像素),而不是居中??获得位置+ 20像素?
我的意思是让一个href标记当前位置和+20 – user259752 2010-08-25 20:01:00
@ user259752 - 啊,一会儿我会更新 – 2010-08-25 20:01:44