-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathblogger-popform.js
28 lines (25 loc) · 1.08 KB
/
blogger-popform.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// BLOGGER POPUP COMMENT FORM
// http://gplus.to/tovic
jQuery(function() {
jQuery(popSelector).wrap('<div class="pop-form"></div>');
jQuery('div.pop-form').hide().wrapInner('<div class="innerpop"></div>').append('<a href="#" class="close">×</a><a class="closebutton">' + popCloseButtonText + '</a>');
jQuery('div.pop-form').css({
'position' :'fixed',
'top' :'50%',
'left' :'50%',
'margin-left' :-($('div.pop-form').outerWidth()/2),
'margin-top' :-($('div.pop-form').outerHeight()/2),
'z-index' :999,
'display' :'none'
}).before('<a class="openform from-js" href="#">' + openformText + '</a>');
jQuery('a.openform').live("click", function() {
jQuery('body').append('<div id="poplay"></div>');
jQuery('div.pop-form').fadeIn(popFadeSpeed);
return false;
});
jQuery('div.pop-form a.close, div.pop-form a.closebutton').live("click", function() {
jQuery(this).parents('div.pop-form').hide();
jQuery('#poplay').remove();
return false;
});
});