This file contains hidden or 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 flag = true; | |
$(window).mouseout(function(e) { | |
if (e.pageY - $(window).scrollTop() < 1 && flag == true) { | |
doSomething(); | |
flag = false; | |
} | |
}) |
This file contains hidden or 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
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { | |
/* IE10+ CSS */ | |
} | |
@supports (-ms-ime-align:auto) { | |
/* IE Edge 12+ CSS */ | |
} |
This file contains hidden or 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
border: 0 transparent solid | |
background-clip: padding-box | |
border-left-width: 7px |
This file contains hidden or 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 _countDown = function(elem) { | |
var timerTime = 5000; | |
var minutes = 15; | |
var counter = $('.counter__num'); | |
var value = counter.text(); | |
var date = new Date(); |
This file contains hidden or 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
$.fn.isOnScreen = function(shift){ | |
if(!shift){ | |
shift = 0; | |
} | |
var viewport = {}; | |
viewport.top = $(window).scrollTop(); | |
viewport.bottom = viewport.top + $(window).height(); | |
var bounds = {}; | |
bounds.top = this.offset().top + shift; | |
bounds.bottom = bounds.top + this.outerHeight() - shift; |
This file contains hidden or 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
add_action( 'wp_enqueue_scripts', 'my_scripts_method' ); | |
function my_scripts_method(){ | |
wp_enqueue_style( 'style', get_stylesheet_uri(), array(), hash_file('crc32', get_stylesheet_uri())); | |
wp_enqueue_script('libs', get_template_directory_uri() . '/js/libs.js', array(), hash_file('crc32', get_template_directory_uri() . '/js/libs.js'), true); | |
wp_enqueue_script('custom', get_template_directory_uri() . '/js/common.js', array(), hash_file('crc32', get_template_directory_uri() . '/js/common.js'), true); | |
wp_deregister_script( 'jquery-core' ); | |
wp_register_script( 'jquery-core', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
}; |
This file contains hidden or 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 scrollPos = 0; | |
$(window).scroll(function(){ | |
var st = $(this).scrollTop(); | |
if (st > scrollPos){ | |
$('#info').text('DOWN'); | |
} else { | |
$('#info').text('UP'); | |
} | |
scrollPos = st; | |
}); |
This file contains hidden or 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).ready(function(){ | |
$(".topBar__menu a").on('click', function(event) { | |
if (this.hash !== "") { | |
event.preventDefault(); | |
var hash = this.hash; | |
$('html, body').animate({ | |
scrollTop: $(hash).offset().top | |
}, 800, function(){ | |
window.location.hash = hash; | |
}); |
This file contains hidden or 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
.slider { | |
display: flex; | |
overflow-x: auto; | |
-webkit-overflow-scrolling: touch; | |
scroll-snap-points-x: repeat(300px); | |
scroll-snap-type: mandatory; | |
} | |
.slider > div { | |
flex-shrink: 0; |
This file contains hidden or 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
$("table.price tr").on( | |
"click", | |
function() { | |
if ($(this).find('a').attr('href')) | |
document.location.href = $(this).find('a') | |
.attr('href'); | |
}); |