Skip to content

Instantly share code, notes, and snippets.

View dzpower's full-sized avatar
🏠
Working from home

Dima dzpower

🏠
Working from home
View GitHub Profile
@kickboxer
kickboxer / ajax отправка формы на email с помощью jQuery и php
Last active July 3, 2023 21:14
ajax отправка формы на email с помощью jQuery и php
$(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; // ошибка
}
});
@DavidWells
DavidWells / reset.css
Last active June 25, 2024 18:15 — forked from karbassi/reset.css
CSS reset. Follow me on the twitters for more tips: https://twitter.com/davidwells
/* 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,