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
<div id="top" class="back-to-top"><img src="img/back-to-top.jpg" alt="arrow-to-top"/></div> | |
<script type="text/javascript"> | |
var top_show = 150; // В каком положении полосы прокрутки начинать показ кнопки "Наверх" | |
var delay = 1000; // Задержка прокрутки | |
$(document).ready(function() { | |
$(window).scroll(function () { // При прокрутке попадаем в эту функцию | |
/* В зависимости от положения полосы прокрукти и значения top_show, скрываем или открываем кнопку "Наверх" */ | |
if ($(this).scrollTop() > top_show) $('#top').fadeIn(); |
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
select { | |
width: 100px; | |
height: 26px; | |
border-radius: 10px; | |
-webkit-appearance: none; | |
background-image: url("../img/select_bg.png"); | |
background-position: right center; | |
background-repeat: no-repeat; | |
line-height: 1em; | |
/* for FF */ |
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
$(window).scroll(function() { | |
var st = $(this).scrollTop() /10; | |
$(".object").css({ | |
"transform" : "translate3d(0px, " + st + "%, .01px)", | |
"-webkit-transform" : "translate3d(0px, " + st + "%, .01px)" | |
}); | |
}); |
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
<ul class="small_photo"> | |
<li><img class="active" src="img/img_thumb.png" alt="photo"/></li> | |
<li><img src="img/img_thumb1.jpg" alt="photo"/></li> | |
<li><img src="img/img_thumb.png" alt="photo"/></li> | |
<li><img src="img/img_thumb.png" alt="photo"/></li> | |
</ul> | |
$(".small_photo img").click(function() { | |
$(".small_photo img").removeClass("active"); | |
$(this).addClass("active"); |
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
<form method="GET" action="hear name files, where code form"> | |
<div class="form min-form" data-name="Отправить"> | |
<input type="hidden" name="cat" value="Отправить"> | |
<input type="hidden" name="utm_source" class="source" value="<?php echo isset($_GET['utm_source']) ? $_GET['utm_source'] : '' ;?>" /> | |
<input type="hidden" name="utm_term" class="term" value="<?php echo isset($_GET['utm_term']) ? $_GET['utm_term'] : '' ;?>" /> | |
<input type="hidden" name="utm_medium" value="<?php echo $_GET['utm_medium'];?>"> | |
<input type="hidden" name="utm_campaign" value="<?php echo $_GET['utm_campaign'];?>"> | |
<input type="hidden" name="utm_content" value="<?php echo $_GET['utm_content'];?>"> | |
<input class="tel" name="tel" type="text" placeholder="Ваш телефон" data-name="Телефон"> | |
<div class="button_conteiner"> |
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
<div id="tab"> | |
<input type="radio" name="table" id="n1" checked/> | |
<label for="n1">Tab 1</label> | |
<input type="radio" name="table" id="n2"/> | |
<label for="n2">Tab 2</label> | |
<input type="radio" name="table" id="n3"/> | |
<label for="n3">Tab 3</label> | |
<div id="table"> | |
<div> |
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
// Cache selectors | |
var lastId, | |
topMenu = $("#your selector"), // here class or id your menu | |
topMenuHeight = topMenu.outerHeight()+100, | |
// All list items | |
menuItems = topMenu.find("a"), | |
// Anchors corresponding to menu items | |
scrollItems = menuItems.map(function(){ | |
var item = $($(this).attr("href")); | |
if (item.length) { return item; } |
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() { | |
$("a").click(function () { | |
var elementClick = $(this).attr("href") | |
var destination = $(elementClick).offset().top; | |
jQuery("html:not(:animated),body:not(:animated)").animate({scrollTop: destination - 300}, 800); | |
return false; | |
}); | |
/*--------------------- Second method -------------------------*/ | |
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
$(" your element").click(function() | |
{ | |
$(this).next("your element").slideToggle('normal'); | |
}); |
OlderNewer