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
<?php | |
$post = $wp_query->post; | |
if (in_category('cat_label_1')) { | |
include(TEMPLATEPATH.'/single-cat_label_1.php'); | |
} elseif (in_category('cat_label_2')) { | |
include(TEMPLATEPATH.'/single-cat_label_2.php'); | |
} | |
?> |
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 ($(document).scrollTop() > 130) { | |
$("body").addClass("top_menu_small"); | |
} else { | |
$("body").removeClass("top_menu_small"); | |
} | |
}); |
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="cont"> | |
<ul> | |
<li> | |
<a href="#"> | |
<h3>title</h3> | |
</a> | |
<div class="hide_block"> | |
<div class="hide_block_inner"> | |
<div class="text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae.</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
$(document).on('touchstart click', '.class', function() { | |
$(".menu_container").fadeIn(600) | |
}); | |
$(document).on('touchstart click', '.class to close', function() { | |
$(".menu_container").fadeOut(600) | |
}); |
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
var small = $(".from litle a img"), | |
big = $(".to big img"); | |
small.each(function(i, el) { | |
var next = i + 1 == small.size() ? 0 : i + 1; | |
$(el) | |
.click( | |
function(event) { | |
event.preventDefault(); | |
if (big.data("next") == next) return; | |
big.fadeTo(500, 0.1, function() { |
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
/* Push the body and the nav over by 285px over | |
$('.nav.burger a').click(function() { | |
$('.hidden_menu').animate({ | |
left: "0px" | |
}, 200); | |
$('body').animate({ | |
left: "285px" | |
}, 200); | |
});*/ |
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
<?php | |
if ( have_posts() ) : // если имеются записи в блоге. | |
query_posts('cat=3'); // указываем ID рубрик, которые необходимо вывести. | |
while (have_posts()) : the_post(); // запускаем цикл обхода материалов блога | |
?> | |
<?php the_post_thumbnail(array(100, 100)); ?> | |
<? endwhile; // завершаем цикл. | |
endif; | |
/* Сбрасываем настройки цикла. Если ниже по коду будет идти еще один цикл, чтобы не было сбоя. */ | |
wp_reset_query(); |
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
.visually-hidden { | |
position: absolute !important; | |
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ | |
clip: rect(1px, 1px, 1px, 1px); | |
padding:0 !important; | |
border:0 !important; | |
height: 1px !important; | |
width: 1px !important; | |
overflow: hidden; | |
} |
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
/*Scroll to ID*/ | |
// handle links with @href started with '#' only | |
$(document).on('click', '.pages-smaller ul li a[href^="#"]', function(e) { | |
// target element id | |
var id = $(this).attr('href'); | |
// target element | |
var $id = $(id); | |
if ($id.length === 0) { |
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
/* Get user WebCam*/ | |
<script> | |
navigator.getUserMedia = ( navigator.getUserMedia || | |
navigator.webkitGetUserMedia || | |
navigator.mozGetUserMedia || | |
navigator.msGetUserMedia); | |
if (navigator.getUserMedia) { | |
navigator.getUserMedia ( |
OlderNewer