Skip to content

Instantly share code, notes, and snippets.

View ivan-kalachikov's full-sized avatar
:octocat:
falling in love with open source

Ivan Kalachikov ivan-kalachikov

:octocat:
falling in love with open source
View GitHub Profile
@ivan-kalachikov
ivan-kalachikov / init.js
Created November 8, 2018 14:20
Open files and external links in new tab
//opening external links in new tab
$(document.links).filter(function() {
return this.hostname != window.location.hostname || $(this).attr('href').split('/').pop().indexOf('.') > -1;
}).attr({
'target': '_blank',
'rel': 'noopener'
});
@ivan-kalachikov
ivan-kalachikov / init.js
Created October 17, 2018 10:14
Parallax
<script>
(function () {
jQuery(window).load(function () {
var ua = window.navigator.userAgent;
ms_ie = /MSIE|Trident/.test(ua);
if ( ! ms_ie ) {
jQuery('.new-home-section').parallaxie({
speed: 0.5,
offset: 0,
});
@ivan-kalachikov
ivan-kalachikov / init.js
Created September 26, 2018 03:57
light tabs
//tab-content
$(".tabs").lightTabs();
(function($){
jQuery.fn.lightTabs = function(options){
var hash = window.location.hash.slice(1);
var createTabs = function(){
var tabs = this;
var i = 0;
@ivan-kalachikov
ivan-kalachikov / index.html
Created July 11, 2018 10:20
Video banner responsive
<div class="banner with-video" style="background-image: url({{root}}images/banner.jpg)">
<div class="video-viewport">
<video width="1920" height="1080" autoplay muted loop>
<source src="http://www.coverr.co/s3/mp4/Winter-Grass.mp4" type="video/mp4" />
<source src="http://www.coverr.co/s3/mp4/Winter-Grass.webm" type="video/webm" />
</video>
</div>
<!-- /.video -->
<div class="overlay"></div>
<div class="inner">
@ivan-kalachikov
ivan-kalachikov / style.scss
Created June 12, 2018 11:38
Firefox hack
@-moz-document url-prefix() {
.services-big-block .services-big-list li {
display: table;
}
}
@ivan-kalachikov
ivan-kalachikov / magnific-popup-gallery-image-plus-video.js
Created April 16, 2018 12:19
magnific-popup-gallery-image-plus-video
@ivan-kalachikov
ivan-kalachikov / 111
Created October 30, 2017 15:06
triangle 100% height
&::before,
&::after {
width: 20px;
height: 50%;
position: absolute;
left: 100%;
content: "";
}
&:before {
@ivan-kalachikov
ivan-kalachikov / css
Created May 30, 2017 05:07
responsive table
table {
td {
display: block;
margin-bottom: 20px;
line-height: 20px;
font-size: 15px;
&:not(:empty)::before {
content: attr(data-title);
display: block;
@ivan-kalachikov
ivan-kalachikov / js
Created May 29, 2017 08:07
Google Map Marker Info Window
.custom-iw {
box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
border-radius: 2px;
background-color: #0086aa;
width: auto !important;
max-width: 253px;
padding: 16px 26px;
color: #fff;
text-align: center;
&:extend(.section-title);