This file contains 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() { | |
$('#form').submit(function() { | |
$.ajax({ | |
type: 'POST', | |
url: 'mail.php', | |
data: $(this).serialize() |
This file contains 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
<?php | |
$recepient = "volos88@gmail.com"; | |
$sitename = "Ajax форма"; | |
$name = trim($_POST["name"]); | |
$phone = trim($_POST["phone"]); | |
$text = trim($_POST["text"]); | |
$message = "Имя: $name \nТелефон: $phone \nТекст: $text"; |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
This file contains 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
.crossOut | |
background: url("data:image/svg+xml;utf-8,<svg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' width='123px' height='51px' viewBox='0 0 123 51' enable-background='new 0 0 123 51' preserveAspectRatio='none' xml:space='preserve'><line fill='none' x1='123' y1='0' x2='0' y2='51' style='stroke:rgb(255,0,0); stroke-width:2' /></svg>") no-repeat scroll 0 0 / 100% 100% transparent | |
background-repeat: no-repeat | |
background-position: center center | |
background-size: 100% 100%, auto | |
border: solid #f00 2px | |
padding: 0 !important |
This file contains 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://codepen.io/chriscoyier/pen/zDGkw |
This file contains 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
// Scroll to object | |
$("#arrow-down").on('click', function(e) { | |
$('html, body').animate({ | |
scrollTop: $("#descr-section").offset().top | |
}, 1000); | |
e.preventDefault(); | |
}); |
This file contains 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
// Sticky header | |
$(window).scroll(function() { | |
if ( $(this).scrollTop() > 0 ) { | |
$('.top-block').addClass('fixed'); | |
} else if( $(this).scrollTop() == 0 ) { | |
$('.top-block').removeClass('fixed'); | |
} | |
}); |
This file contains 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
$('p').each(function() { | |
var word = $(this).html(); | |
var index = word.indexOf(' '); | |
if(index == -1) { | |
index = word.length; | |
} | |
$(this).html('<span class="first-word">' + word.substring(0, index) + '</span>' + word.substring(index, word.length)); | |
}); |
This file contains 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
1. Simple (Node.js LTS, Gulp, rimraf, NCU): | |
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config | |
2. Advanced (Node.js LTS, Gulp, rimraf, NCU, Ruby, Jekyll, Jekyll paginate) | |
sudo apt-add-repository -y ppa:brightbox/ruby-ng; sudo apt-get update; sudo apt-get -y install curl ruby2.5 ruby2.5-dev gcc make g++ libffi-dev; curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -; sudo apt-get -y install nodejs; sudo gem i jekyll; sudo gem i jekyll-paginate-v2; sudo npm i -g gulp rimraf npm-check-updates bower; sudo chown -R $USER:$(id -gn $USER) /home/$USER/.config | |
3. Длинна командной строки (добавить PROMPT_DIRTRIM=3 в конец и сохранить файл): | |
sudo nano ~/.bashrc | |
PROMPT_DIRTRIM=3 |