Skip to content

Instantly share code, notes, and snippets.

View fiximportant's full-sized avatar

igor fiximportant

View GitHub Profile
@fiximportant
fiximportant / scroll.js
Created September 7, 2018 14:42
Smoth Scroll Anchors
//SMOTH SCROLL MENU
$('.sp-megamenu-parent > li > a').click(function(){
$('html, body').animate({
scrollTop: $( $.attr(this, 'href') ).offset().top - 59 /* Minus 59 pixels */
}, 500);
return false;
});
//END
@fiximportant
fiximportant / desktop.css
Last active September 17, 2018 10:19
Bootstrap Breakpoints
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
/*===============================*/
/*===============================*/
}/* END */
@media (max-width: 1199.98px) {
/*===============================*/
/*===============================*/
}/* END */
@fiximportant
fiximportant / init.js
Created April 5, 2018 11:58
OwlCarousel - Breakpoints
function CarouselInit() {
var checkWidth = $(window).width();
var carousel = $(".js-carousel-catmain");
if (checkWidth < 980) {
carousel.addClass('owl-carousel').owlCarousel({
items: 1,
margin: 20,
nav: true,
navText: [],
@fiximportant
fiximportant / style.css
Created April 2, 2018 11:53
BoxSizing - CrossBrowser
html {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*, *:before, *:after {
-webkit-box-sizing: inherit;
-moz-box-sizing: inherit;
box-sizing: inherit;
}
@fiximportant
fiximportant / style.css
Last active February 21, 2018 07:46
Kinetik Scroll
overflow: auto;
overflow-y: hidden;
-webkit-overflow-scrolling:touch;
@fiximportant
fiximportant / css-var-polyfill.js
Created December 6, 2017 15:56
CSS Variable Polyfill
/*
TODO:
- Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns
*/
var cssVarPoly = {
init: function() {
if (window.CSS && window.CSS.supports && window.CSS.supports('(--foo: red)')) {
return;
}
cssVarPoly.ratifiedVars = {};
@fiximportant
fiximportant / index.html
Last active November 30, 2017 09:03
JS Sticky
<script>
$(function(){
//begin title fixed
$(document).load($(window).bind("resize", listenWidth));
function listenWidth( e ) {
var windowWidth = $(window).width();
if (windowWidth > 767) {
stick();
}
@fiximportant
fiximportant / index.html
Created October 30, 2017 08:08
ScrollUP
<script>
$(window).scroll(function () {
if ($(this).scrollTop() > 300) $('.js-scrollup>a').fadeIn(200);
else $('.js-scrollup>a').fadeOut(400);
});
$('.js-scrollup>a').click(function () {
$('html,body').animate({
scrollTop: 0
}, 800);
return false;
@fiximportant
fiximportant / index.html
Created October 9, 2017 13:29
Ссылки - Разводка
<style>
.b-linkbox {}
.b-linkbox .linkbox__row {
margin: 0 -5px 25px;
padding: 12px;
background-color: #f7f7f7;
}
.b-linkbox .linkbox__item {
display: inline-block;
vertical-align: top;
@fiximportant
fiximportant / style.css
Created October 4, 2017 14:06
ImageNoBlurOnResize
-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1.0, 1.0);