Skip to content

Instantly share code, notes, and snippets.

View alexkooksa's full-sized avatar

Alexandra Kuksa alexkooksa

View GitHub Profile
// getCookie(), setCookie(), deleteCookie()
// возвращает cookie если есть или undefined
function getCookie(name) {
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
))
return matches ? decodeURIComponent(matches[1]) : undefined
@alexkooksa
alexkooksa / responsive-iframes.css
Created May 30, 2018 08:19 — forked from aarongustafson/responsive-iframes.css
Responsive iFrames with jQuery
iframe {
max-width: 100%;
}
@alexkooksa
alexkooksa / douchebag-vertical-align.css
Last active March 7, 2018 09:35 — forked from colintoh/douchebag-vertical-align.css
douchebag way of vertical alignment
.parent {transform-style: preserve-3d;}
.element {
position: relative;
top: 50%;
transform: translateY(-50%);
}
@alexkooksa
alexkooksa / square.html
Created October 21, 2016 09:31 — forked from erming/square.html
Responsive square <div> with CSS only
<div class="square">
<div class="square-content">
Hello world!
</div>
</div>