Skip to content

Instantly share code, notes, and snippets.

/*
* Replace all SVG images with inline SVG
*/
$('img.img-svg').each(function () {
var $img = jQuery(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
$.get(imgURL, function (data) {
$(".menu a, .logo").mPageScroll2id({
offset: 0,
scrollSpeed: 800
});
$('.btn_mnu').click(function(){
if($('.menu').is(':visible')){
$('.menu').fadeOut(500);
} else {
$('.menu').fadeIn(600);
};
});
<link rel="shortcut icon" href="img/favicon/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon" href="img/favicon/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/favicon/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/favicon/apple-touch-icon-114x114.png">
$(".tabs").on("click", "li", function(){
$(".tabs li").removeClass("active"); //удаляем класс во всех вкладках
$(this).addClass("active"); //добавляем класс текущей (нажатой)
});
$(document).ready(function () {
$('input,textarea').focus(function(){
$(this).data('placeholder',$(this).attr('placeholder'))
$(this).attr('placeholder','');
});
$('input,textarea').blur(function(){
$(this).attr('placeholder',$(this).data('placeholder'));
});
});
font-size: calc( 4rem + ((2 - 1) * 16) * (100vw - 320px) / (848 - 320) )