Skip to content

Instantly share code, notes, and snippets.

$('a[href^="#move-"]').bind('click.smoothscroll',function (e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top-($(".menu-section").height()+ 0) // 0 - own offset
}, 1000, 'easeInOutQuint', function () {
window.location.hash = target;
});
});
.embed-responsive
position: relative
display: block
height: 0
padding: 0
overflow: hidden
.embed-responsive-item, embed, iframe, object, video
position: absolute
top: 0
bottom: 0
wp_enqueue_script( 'es5-shim', get_template_directory_uri() . '/libs/html5shiv/es5-shim.min.js', array(), '', true );
wp_script_add_data( 'es5-shim', 'conditional', 'lt IE 9' );
wp_enqueue_script( 'html5shiv', get_template_directory_uri() . '/libs/html5shiv/html5shiv.min.js', array(), '', true );
wp_script_add_data( 'html5shiv', 'conditional', 'lt IE 9' );
wp_enqueue_script( 'html5shiv-printshiv', get_template_directory_uri() . '/libs/html5shiv/html5shiv-printshiv.min.js', array(), '', true );
wp_script_add_data( 'html5shiv-printshiv', 'conditional', 'lt IE 9' );
wp_enqueue_script( 'respond', get_template_directory_uri() . '/libs/respond/respond.min.js', array(), '', true );
wp_deregister_script('jquery');
wp_register_script('jquery', ("https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"), false, '1.11.3', true);
wp_enqueue_script('jquery');
<?php
$tags = get_tags();
if ($tags) {
foreach ($tags as $tag) {
echo '<p>Tag: <a href="' . get_tag_link( $tag->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '>' . $tag->name.'</a> </p> ';
}
}
?>
<?php
$tags = wp_get_post_tags($post->ID);
$("#button").click(function() {
$("html, body").animate({ scrollTop: $(".section-two").height()+120 }, "slow");
return false;
});
@user44
user44 / gulpfile.js
Last active December 23, 2015 10:02
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');
// Сервер + отслеживание sass/html/php файлов
gulp.task('serve', ['sass'], function() {
browserSync.init({
server: "./"
});
$(window).scroll(function(){
$('.scroll-menu').toggleClass('menu-fixed', $(this).scrollTop() > 1000);
});
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function() {
heightDetect();
});
/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
.animated {
/*CSS transitions*/
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
-webkit-transition-property: none !important;
transition-property: none !important;
/*CSS transforms*/