Skip to content

Instantly share code, notes, and snippets.

View flayder's full-sized avatar
🏠
Working from home

Artem flayder

🏠
Working from home
View GitHub Profile
@flayder
flayder / index.php
Created September 5, 2015 10:39
last section
<section id="new-post" class="wow bounceInUp" data-wow-duration="2s" data-wow-delay="1s">
<div class="container">
<div class="title">Свежие публикации</div>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="new-post col-md-6" >
<div class="wrap">
<noindex>
<a rel="nofollow" href="<?php the_permalink(); ?>
">
<?php the_title(); ?></a>
@flayder
flayder / popup.js
Created September 5, 2015 08:34
Плавное появление popup - который можно убрать при клике на любой участок документа, но не при клике на область popup
$(document).ready(function(){
$('.carousel').carousel();
$('.btn-button-blue a').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
@flayder
flayder / anchor.js
Created September 5, 2015 08:28
Плавное перемещение к якорю!
$('.btn-button-blue a').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}