
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 2.18 KB | hits: 12 | expires: Never
Colorbox opens at the wrong size, then shrinks to correct size
$(function(){
$('#notifyFormLink').colorbox({
width:300,
height:270,
opacity:0,
transition:"none",
scrolling:false,
onComplete: function() {
notifySubmit();
}}); // end colorbox
}); // end anon function
function notifySubmit() {
// $.colorbox.resize();
$('#emailNotify').focus();
$("#notifyForm").submit(function(){
var input = $('#emailNotify').val();
if (input.match(/^[wd.+]+@[wd.+]+$/)) {
$.get(
$(this).attr('action'),
$(this).serialize(),
function(data){
$().colorbox({
html: data,
width:300,
height:270,
opacity:0,
transition:"none",
scrolling:false,
onComplete: function() {
notifySubmit();
}});
} // end data
); // end get
return false;
} else {
$('#validationResponse').html('<span style="font-size:12px">Bad e-mail: please try again.</span>');
return false;
}
}); // end submit
} // end notifySubmit