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 secondaryNav = $('nav'), | |
secondaryNavTopPosition = secondaryNav.offset().top; | |
$(window).on('scroll', function(){ | |
if($(window).scrollTop() >= secondaryNavTopPosition ) { | |
secondaryNav.addClass('is-fixed'); | |
} else { | |
secondaryNav.removeClass('is-fixed'); | |
} |
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
/* | |
* Replace all SVG images with inline SVG | |
*/ | |
$('img.img-svg').each(function(){ | |
var $img = $(this); | |
var imgID = $img.attr('id'); | |
var imgClass = $img.attr('class'); | |
var imgURL = $img.attr('src'); | |
$.get(imgURL, function(data) { |
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
$(".tabs-media .tabs .tab").click(function() { | |
$(".tabs-media .tabs .tab").removeClass("active").eq($(this).index()).addClass("active"); | |
$(".tabs-media .tab-content .tab-item").hide().eq($(this).index()).fadeIn() | |
}).eq(0).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
$(".accordeon dd").hide().prev().click(function() { | |
$(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active"); | |
$(this).next().not(":visible").slideDown().prev().addClass("active"); | |
}); | |
<div class="accordeon"> | |
<dl> | |
<dt>Заголовок</dt> | |
<dd>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aperiam ea, accusamus. Numquam non commodi ipsum debitis repudiandae amet vero itaque, deserunt, ad neque libero quae officia. Facilis non, possimus doloribus! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid quis voluptatem repellat? Blanditiis iste, exercitationem porro, magni amet cupiditate enim, labore tenetur, praesentium quam consequuntur nesciunt. Culpa dicta adipisci voluptatem.</dd> | |
</dl> | |
<dl> |
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
$(".top").click(function() { | |
$("html, body").animate({ scrollTop: 0},"slow"); | |
return false; | |
}); |
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 Wheel Icon | |
.mouse-icon | |
border: 2px solid $blue | |
border-radius: 16px | |
height: 40px | |
width: 24px | |
display: inline-block | |
z-index: 10 | |
opacity: 0.7 | |
cursor: pointer |
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('p=1'); | |
while (have_posts()) : the_post(); ?> | |
<?php the_title(); ?> | |
<?php the_content(); ?> | |
<?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
<?php | |
$idObj = get_category_by_slug('s_about'); | |
$id = $idObj->term_id; | |
echo get_cat_name($id); | |
?> |
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
function my_video($atts){ | |
extract( shortcode_atts( array( | |
'src' => $atts['src'], | |
'poster' => $atts['poster'], | |
), $atts ) ); | |
$html='<div class="video_wrap"> | |
<video id="movie" poster="'.$atts['poster'].'" preload="none" controls="""> | |
<source src="'.$atts['src'].'" /> | |
<source src="'.$atts['src'].'" type="video/webm; codecs="vp8, vorbis"" /> | |
<source src="'.$atts['src'].'" type="video/ogg; codecs="theora, vorbis"" /> |
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
function wp_corenavi(){ | |
global $wp_query, $wp_rewrite; | |
$pages = ''; | |
$max = $wp_query->max_num_pages; | |
if (!$current = get_query_var('paged')) $current = 1; | |
$a['base'] = str_replace(999999999, '%#%', esc_url(get_pagenum_link(999999999))); | |
$a['total'] = $max; | |
$a['current'] = $current; | |
$total = 0; //1 - выводить текст "Страница N из N", 0 - не выводить |
OlderNewer