window.pageYOffset
window.scrollTo(0,0)
$(document).ready(function() {
$('.class-email').blur(function() {
if($(this).val() != '') {
var pattern = /^([a-z0-9_\.-])+@[a-z0-9-]+\.([a-z]{2,4}\.)?[a-z]{2,4}$/i;
if(pattern.test($(this).val())){
$(this).removeClass('error');
$('#valid').text('');
} else {
$(this).addClass('error');
$('#valid').text('The field is required.');
}
}
});
});