Skip to content

Instantly share code, notes, and snippets.

View Kasst1el's full-sized avatar

Kasst1el

  • Kiev
View GitHub Profile
jQuery(this).find("img");
var stock_count = 2;
$(function(){
$(".wrap_gallery").swipe({
tap:function(){
$("#g_" + stock_count).css("opacity","0");
if(stock_count == 3){
stock_count = 0;
} else {
//////////
}
$("header .h_sale .button_h_sale").click(function() {
$("html, body").animate({
scrollTop : $(".s_sign_up").offset().top
}, 1200);
});
$(".h_form_sign_up form .button_h_sale").click(function(){
valid = true;
var empty_field = "";
if(document.form_sign_up.name.value==""||document.form_sign_up.surname.value==""||document.form_sign_up.second_phone.value==""||document.form_sign_up.email.value==""||document.form_sign_up.password.value==""||document.form_sign_up.password_again.value==""){
if(document.form_sign_up.name.value == ""){
empty_field += $(".h_form_sign_up form #name").attr("placeholder");
$("#popup h1").html("Заполните, пожалуйста, поля:<br>" + empty_field)
$("#popup").fadeIn(400);
valid = false;
function hSize(){
var windowWidth = $(window).width();
var menu_block = $(".s_menu .button_h_sale").width();
if ($(window).width() <= '1200'){
var height_of_image_gallery = $(".s_gallery .gallery img").height();
$(".s_gallery .gallery").css("line-height",height_of_image_gallery + "px");
$(".s_gallery .gallery").css("height",height_of_image_gallery + "px");
}
<script>
$('#h_sign_in').click( function(event){ // лoвим клик пo ссылки с id="go"
event.preventDefault();
$("body").css("overflow-y","hidden");
$("body").css("overflow-x","hidden");
$('#overlay').fadeIn(400, // снaчaлa плaвнo пoкaзывaем темную пoдлoжку
function(){ // пoсле выпoлнения предъидущей aнимaции
$('#modal_form_sign_in')
https://gist.github.com/agragregra/eb89e4425442b559207c
$(".gallery").click(function(){
var innerWidthWindow = $(window).innerHeight() - 56;
$(".fotorama").data('height', innerWidthWindow).attr('data-height', innerWidthWindow);
});