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
.verticalcenter{ | |
position: relative; | |
top: 50%; | |
-webkit-transform: translateY(-50%); | |
-o-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} |
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(){ | |
if($(window).scrollTop()>300){ | |
$('#elem').show() | |
} | |
}) | |
#elem{ | |
display:none; |
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
// выключаем скролл | |
$('#overlay').delay(5000).fadeIn(400, // снaчaлa плaвнo пoкaзывaем темную пoдлoжку | |
function(){ // пoсле выпoлнения предъидущей aнимaции | |
$('body').css('overflow', 'hidden'); | |
$('#forma-send') | |
.css('display', 'block') // убирaем у мoдaльнoгo oкнa display: none; | |
.animate({opacity: 1, top: '50%'}, 200); // плaвнo прибaвляем прoзрaчнoсть oднoвременнo сo съезжaнием вниз | |
}); | |
/* Зaкрытие мoдaльнoгo oкнa, тут делaем тo же сaмoе нo в oбрaтнoм пoрядке */ |
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
<head prefix="og: http://ogp.me/ns#"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Twitter Cards — Twitter Developers</title> | |
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
$(".mouse-icon").click(function(){ | |
$("html, body").animate({ | |
scrollTop : $(".s-adv").offset().top | |
}, 1000); | |
}) | |
//.mouse-icon - элемент на который кликаем | |
//.s-adv - куда скролит |
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
#face .col-sm-4:nth-child(3n+1) { | |
clear: both; | |
} |
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 class="header-search-wrap"> | |
<form role="search" method="get" id="searchform" class="searchform form-inline" action="/"> | |
<input type="text" value="" name="search" id="search" class="form-control" placeholder=""> | |
<button type="submit" id="searchsubmit" class="theme_button text-right"><img class="search-img" src="img/header-search.jpg" alt="Поиск"></button> | |
</form> | |
</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
# Редирект c www на без www | |
RewriteCond %{HTTP_HOST} ^www.site.ru | |
RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L] | |
# Редирект для главной (с /index.php на /) | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/ | |
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
<nav id="menu" class="navbar"> | |
<div class="navbar-header"><span id="category" class="visible-xs"><?php echo $text_category; ?></span> | |
<button type="button" class="btn btn-navbar navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"><i class="fa fa-bars"></i></button> | |
</div> | |
<div class="collapse navbar-collapse navbar-ex1-collapse"> | |
<ul class="nav navbar-nav"> | |
<?php foreach ($categories as $category) { ?> | |
<!-- <?php if ($category['children']) { ?> | |
<li class="dropdown"><a href="<?php echo $category['href']; ?>" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category['name']; ?></a> | |
<div class="dropdown-menu"> |
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
/*-------button-------*/ | |
$('body').append('<button class="btn_up">TOP</button>'); | |
$('.btn_up').click(function() { | |
$('html, body').animate({'scrollTop': 0}, 700); | |
}); | |
$(window).scroll(function() { | |
if($(window).scrollTop() > 250) { | |
$('.btn_up').addClass('active'); | |
} else { | |
$('.btn_up').removeClass('active'); |
OlderNewer