Skip to content

Instantly share code, notes, and snippets.

View rayets123's full-sized avatar

Vitaliy rayets123

  • Kyiv
View GitHub Profile
@rayets123
rayets123 / form.js
Created January 17, 2016 12:32
форма Ajax
$("#form").submit(function() {
$.ajax({
type: "POST",
url: "mail.php",
data: $(this).serialize()
}).done(function() {
alert("Спасибо за заявку!");
setTimeout(function() {
$("#form").trigger("reset");
@rayets123
rayets123 / search.js
Created January 29, 2016 10:56
search
$(".toggle-mnu").click(function() {
$(this).toggleClass("on");
if ($(".right_sidebar").css("right") == "0px") {
$(".right_sidebar").css("right", "-185px");
}
else{
$(".right_sidebar").css("right", "0px");
}
return false;
});
@rayets123
rayets123 / scroll.js
Created February 1, 2016 17:30
scroll
// $(".arrow_down").click(function () {
// $(".online").animate( {
// scrollTop : "1000"
// } , 800 , 'easeInOutCubic' );
// return false;
// });
// $(".arrow_up").click(function () {
// $(".online").animate( {
// scrollTop : "-1000"
// } , 800 , 'easeInOutCubic' );
@rayets123
rayets123 / chackbox_style.css
Created February 25, 2016 10:21
style for checkbox
label
position: relative
width: 10px
height: 10px
display: block
input[type="checkbox"] + span
position: absolute
left: 1px
top: 5px
width: 11px
@rayets123
rayets123 / Fade Text
Created October 10, 2016 13:22
Fade Text on scroll
http://codepen.io/foleyatwork/pen/HAomG/
https://sarcadass.github.io/granim.js/examples.html
sendNotification('Верните Линуса!', {
body: 'Тестирование HTML5 Notifications',
icon: 'icon.jpg',
dir: 'auto'
});
function sendNotification(title, options) {
// Проверим, поддерживает ли браузер HTML5 Notifications
if (!("Notification" in window)) {
alert('Ваш браузер не поддерживает HTML Notifications, его необходимо обновить.');
@rayets123
rayets123 / multiple promises in-parallel
Last active January 21, 2019 15:03
await multiple promises in-parallel without 'fail-fast' behavior
async function bar() {
await new Promise(r=> setTimeout(r, 1000))
console.log('bar');
}
async function bam() {
await new Promise((ignore, reject)=> setTimeout(reject, 2000))
.catch(()=> { console.log('bam errored'); throw 'bam'; });
}
async function bat() {
await new Promise(r=> setTimeout(r, 3000))
@rayets123
rayets123 / meta-tags.md
Created March 25, 2019 12:43 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@rayets123
rayets123 / gist:16dd8a92b5ab58658dba65ae49dd0695
Created April 25, 2019 12:08 — forked from stereokai/gist:36dc0095b9d24ce93b045e2ddc60d7a0
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: content-box, border-box;
}