Skip to content

Instantly share code, notes, and snippets.

View Shenziger's full-sized avatar
😀

Anton Larionov Shenziger

😀
View GitHub Profile
@Shenziger
Shenziger / jsnewtab.js
Last active August 29, 2015 14:27 — forked from agragregra/jsnewtab.js
JavaScript Open In New Tab
window.open("http://", "_blank");
@Shenziger
Shenziger / header_fadeout.js
Last active August 29, 2015 14:27 — forked from agragregra/header_fadeout.js
jQuery Header Content FadeOut on Scroll
$(window).scroll(function() {
var st = $(this).scrollTop();
if($(window).height()+500 > $("header").height()) {
$("header .col-md-12").css({
"transform" : "translate3d(0px, " + st /18 + "%, 0px)",
"-webkit-transform" : "translate3d(0px, " + st /18 + "%, 0px)",
"opacity" : "1" - st/700
});
@Shenziger
Shenziger / counter.js
Last active August 29, 2015 14:27 — forked from agragregra/counter.js
javaScript Counter from Time
function renderCleanCounter()
{
var curDate = new Date();
var counterBlock = $('#counter');
var counterResulte = Math.round((curDate.getTime() - 1429460070577) / 3000) + 23124;
counterBlock.html(counterResulte);
}
@Shenziger
Shenziger / animate-css.js
Last active August 29, 2015 14:27 — forked from agragregra/animate-css.js
Animate CSS jQuery once animate
//Animate CSS + WayPoints javaScript Plugin
//Example: $(".element").animated("zoomInUp");
//Author URL: http://webdesign-master.ru
(function($) {
$.fn.animated = function(inEffect) {
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) {
if (dir === "down") {
$(this).addClass(inEffect).css("opacity", "1");
};
}, {
JS:
$(".accordeon dd").hide().prev().click(function() {
$(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active");
$(this).next().not(":visible").slideDown().prev().addClass("active");
});
CSS:
.accordeon .active { color: red }
HTML:
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
//Аякс отправка форм
//Документация: http://api.jquery.com/jquery.ajax/
$("#form, #form2").submit(function(e) {
e.preventDefault;
$.ajax({
type: "POST",
url: "mail.php",
data: $(this).serialize()
}).done(function() {
alert("Спасибо за заявку!");
$(".element").waypoint(function() {
$(this).addClass("animated zoomInUp");
}, {
offset: "70%"
});
.element:nth-child(1) {
-webkit-animation-delay: 0s;
-o-animation-delay: 0s;
animation-delay: 0s;
@Shenziger
Shenziger / header_resizer.js
Last active August 29, 2015 14:27
Dinamicly resize header with class .main_head
$(document).ready(function() {
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
@Shenziger
Shenziger / make.sh
Created October 26, 2015 18:58 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"