This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0-modified | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { // вся магия после загрузки страницы | |
$("#ajaxform").submit(function(){ // перехватываем все при событии отправки | |
var form = $(this); // запишем форму, чтобы потом не было проблем с this | |
var error = false; // предварительно ошибок нет | |
form.find('input, textarea').each( function(){ // пробежим по каждому полю в форме | |
if ($(this).val() == '') { // если находим пустое | |
alert('Заполните поле "'+$(this).attr('placeholder')+'"!'); // говорим заполняй! | |
error = true; // ошибка | |
} | |
}); |