Skip to content

Instantly share code, notes, and snippets.

window.addEventListener('resize', test);
var pageWidth;
var sliderBlock = document.querySelector(".swiper-slide-active");
function test(){
pageWidth = document.documentElement.clientWidth;
if(pageWidth < 640){
console.log("640<");
remClassFunc();
jQuery(document).ready(function($) {
$('.gallery-popup').hide().css('opacity', '1');
$('.section1galery .swiper-slide').click(function(event) {
console.log('gallery item '+ $(this).index());
var _src = $(this).find('img').attr('src');
$('.section1galery .left_choreoraphy img')
.attr({
.reviuews-bottom:before,
.reviuews-bottom:after {
content: '';
position: absolute;
left: 0;
right: 0;
bottom: 100%;
z-index: 5;
}
.reviuews-bottom:before {
@0632347878
0632347878 / Function for Fotobox gallery
Created March 27, 2017 20:57
Function for Fotobox gallery
@0632347878
0632347878 / gist:941f03e0b7a7e07b007f510448130daf
Created March 29, 2017 07:44
Delete last sign in string
first = document.querySelector('.title').innerHTML;
alert(first.substring(0, first.length - 1));
$('html, body').animate({
scrollTop: $("#target-element").offset().top
}, 1000);
$('a').click(function(){
let href = $(this).attr('href'),
elem = $(href).offset().top;
$('html, body').animate({scrollTop: elem}, 500);
@0632347878
0632347878 / gist:c777903ae85fac7f9be778a2fe49132e
Created April 6, 2017 15:01
Cut the div1 html and move it to div2
jQuery(function($) {
$('.sscf-popup').click(function() {
$('.mypopup').insertAfter('.row');
});
});
var box = $('#box');
$('button').on('click', function () {
if (box.hasClass('hidden')) {
box.removeClass('hidden');
setTimeout(function () {
box.removeClass('visuallyhidden');
}, 20);
} else {
box.addClass('visuallyhidden');
box.one('transitionend', function(e) {
img {
transition: transform .6s cubic-bezier(.68,-.55,.265,1.55),-webkit-transform .6s cubic-bezier(.68,-.55,.265,1.55);
}
img:hover {
-webkit-transform: rotate(180deg);
transform: rotate(180deg);
}