This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var eventsObj = { | |
addEvent: function (el, type, fn) { | |
if (typeof addEventListener !== 'undefined') { | |
el.addEventListener(type, fn, false); | |
} else if (typeof attachEvent !== 'undefined') { | |
el.attachEvent('on' + type, fn); | |
} else { | |
el['on' + type] = fn; | |
} | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function scrollWidth() { | |
var div = document.createElement('div'); | |
div.style.overflowY = 'scroll'; | |
div.style.width = '50px'; | |
div.style.height = '50px'; | |
div.style.visibility = 'hidden'; | |
document.body.appendChild(div); | |
var s = div.offsetWidth - div.clientWidth; | |
document.body.removeChild(div); | |
return s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// scrollTo | |
var scrolllink = $('selector'); | |
scrolllink.click(function () { | |
var idscroll = $(this).attr('href'); | |
$.scrollTo(idscroll, 1000, { | |
margin: 'true', | |
offset: -80 | |
}); | |
return false; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
margin: 0; | |
padding: 0; | |
} | |
html, | |
body { | |
height: 100%; | |
} | |
.wrapper { | |
display: flex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.plchfcs { | |
opacity: 1; | |
transition: opacity .15s ease-out; | |
} | |
input { | |
&::-webkit-input-placeholder { | |
.plchfcs; | |
} | |
&::-moz-placeholder { | |
.plchfcs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('form').submit(function() { | |
$(this).trigger("reset"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').click(function (e) { | |
if ($(e.target).closest('selector').length == 0) { | |
$('selector').removeClass('_active'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('img[src$=".svg"]').each(function () { | |
var $img = $(this), | |
imgID = $img.attr('id'), | |
imgClass = $img.attr('class'), | |
imgURL = $img.attr('src'); | |
$.get(imgURL, function (data) { | |
var $svg = $(data).find('svg'); | |
if (typeof imgID !== 'undefined') { | |
$svg = $svg.attr('id', imgID); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="preloader" class="preloader"><span class="spinner"></span></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label class="attach attachInput"> | |
<span>Загрузите ваше фото</span> | |
<input type="file" name="photo" class="photo" accept="image/*" required /> | |
</label> |
OlderNewer