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
HTML: | |
<div class="wrapper"> | |
<div class="tabs"> | |
<span class="tab">Вкладка 1</span> | |
<span class="tab">Вкладка 2</span> | |
<span class="tab">Вкладка 3</span> | |
</div> | |
<div class="tab_content"> | |
<div class="tab_item">Содержимое 1</div> | |
<div class="tab_item">Содержимое 2</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
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"> |
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
// totop | |
$(document).ready(function(){ | |
const totop = $(".totop"); | |
// hide #back-top first | |
totop.hide(); | |
// fade in #back-top | |
$(function () { | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > 100) { |
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
* { | |
text-rendering: optimizeLegibility; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
} |
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 BrowserDetect = { | |
init: function () { | |
this.browser = this.searchString(this.dataBrowser) || "Other"; | |
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "Unknown"; | |
}, | |
searchString: function (data) { | |
for (var i = 0; i < data.length; i++) { | |
var dataString = data[i].string; | |
this.versionSearchString = data[i].subString; |
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(){ | |
var hashTagActive = ""; | |
$(".scroll").on("click touchstart" , function (event) { | |
if(hashTagActive != this.hash) { //this will prevent if the user click several times the same link to freeze the scroll. | |
event.preventDefault(); | |
//calculate destination place | |
var dest = 0; | |
if ($(this.hash).offset().top > $(document).height() - $(window).height()) { | |
dest = $(document).height() - $(window).height(); |
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($) { | |
//your code | |
})(jQuery); | |
// или | |
jQuery( document ).ready(function( $ ){ | |
//code | |
}); |
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
// attach file | |
(function() { | |
'use strict'; | |
$('.input-file').each(function() { | |
var $input = $(this), | |
$label = $input.next('.js-labelFile'), | |
labelVal = $label.html(); |
OlderNewer