Skip to content

Instantly share code, notes, and snippets.

View emaklakov's full-sized avatar
👨‍💻
Developing...

Maklakov Evgeniy emaklakov

👨‍💻
Developing...
View GitHub Profile
@emaklakov
emaklakov / scroll-next.js
Last active April 25, 2018 11:23 — forked from agragregra/scroll-next.js
jQuery | Scroll To Next Section
$(".scroll-next").click(function() {
var cls = $(this).closest(".section").next().offset().top;
$("html, body").animate({scrollTop: cls}, "slow");
});
@emaklakov
emaklakov / button.sass
Created April 25, 2018 11:02 — forked from agragregra/button.sass
Button Sass Styles (Universal Starter)
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600
@emaklakov
emaklakov / scroll-top.html
Created April 25, 2018 11:01 — forked from agragregra/scroll-top.html
Scroll Top Button
<div class="top" title="Наверх"><i class="fa fa-angle-double-up"></i></div>
.top
position: fixed
bottom: 25px
background-color: #E0E0E0
border-radius: 10em
color: #666
font-size: 26px
width: 50px
@emaklakov
emaklakov / window-resize-end.js
Last active April 25, 2018 11:27 — forked from agragregra/window-resize-end.js
JS | Window resize-end function
//Resize Window
function onResize() {
};
var doit;
doit = setTimeout(onResize, 400);
window.onresize = function() {
clearTimeout(doit);
doit = setTimeout(onResize, 400);
};
@emaklakov
emaklakov / gist:b32fe735d29aae3bf3a9cfcf83061b0e
Last active April 25, 2018 11:26
JS | Извлечение параметров из URL
function getAllUrlParams(url) {
// извлекаем строку из URL или объекта window
var queryString = url ? url.split('?')[1] : window.location.search.slice(1);
// объект для хранения параметров
var obj = {};
// если есть строка запроса
if (queryString) {
@emaklakov
emaklakov / index.html
Last active April 25, 2018 10:56
Отдать на печать конкретный div
<html>
<head>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script>
<script type="text/javascript">
function PrintElem(elem)
{
Popup($(elem).html());
}