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
$(document).ready(function(){ | |
$("#menu").on("click","a", function (event) { | |
event.preventDefault(); //отменяем стандартную обработку нажатия по ссылке | |
var id = $(this).attr('href'), //забираем идентификатор бока с атрибута href | |
top = $(id).offset().top; //узнаем высоту от начала страницы до блока на который ссылается якорь |
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
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
NewerOlder