Skip to content

Instantly share code, notes, and snippets.

img-responsive {
width: auto\9;
max-width: 100%;
height: auto;
}
@IgorGavrilenko
IgorGavrilenko / youtube
Created September 23, 2016 20:49
youtube
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
videoId: '67_D99r4KVg',
events: {}
});
@IgorGavrilenko
IgorGavrilenko / popap video
Created September 23, 2016 20:52
popap video
(function() {
$('.popap-video').hide('fast')
$('.trigger').click(function(event) {
event.stopPropagation();
$('.popap-video').not($(this).next()).fadeOut('fast');
$(this).next().fadeToggle();
})
})();
@IgorGavrilenko
IgorGavrilenko / search substring url
Last active September 23, 2016 21:08
search substring url
(function() {
var location = document.location.pathname;
var filterOption = '_text_';
if (location.indexOf(filterOption) > -1) {
}
})();
@IgorGavrilenko
IgorGavrilenko / menu link
Last active September 23, 2016 21:09
menu link
@IgorGavrilenko
IgorGavrilenko / hide empty element
Last active September 23, 2016 21:11
hide empty element
$(":empty").parent().hide();
$(":empty").hide();
@IgorGavrilenko
IgorGavrilenko / uniform list item v1
Last active September 23, 2016 21:23
uniform list item v1
ul {
text-align: justify;
}
ul li {
display: inline-block;
}
ul:after {
width: 100%;
height: 0px;
visibility: hidden;
@IgorGavrilenko
IgorGavrilenko / st 3 snippets scope
Last active September 23, 2016 21:25
st 3 snippets scope
https://gist.github.com/iambibhas/4705378
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
@IgorGavrilenko
IgorGavrilenko / max Height
Last active September 23, 2016 21:30
max Height
var maxHeight = 0;
$("div").each(function(){
if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
});
$("div").height(maxHeight);
@IgorGavrilenko
IgorGavrilenko / git config
Last active September 23, 2016 21:35
git config
[filter "lfs"]
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[core]
autocrlf = false
safecrlf = false
editor = 'C:/Program Files/Sublime Text 3/sublime_text.exe' -w
[alias]