1. Go to this page and download the library: Download infrajs/ascroll library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
infrajs / ascroll example snippets
javascript
<script>
$(function(){ //add handler for all links with anchor
window.ascroll({ //default config
"anchor":0, //anchor-блок по умолчанию, до которого нужно проскролить или цифра отступ от верхней границы браузера
"height":'.navbar-fixed-top', //Сселектор fixed-шапки, высоту которой надо компенсировать или цифра высота
"marginBottom":".space", //Отступ от fixed-шапки, может быть селектором блока с marginBottom
"div":"body", //Контейнер с ссылками, которые должны плавно скролиться
"global":false //Нужно ли применять скролл для обычных ссылок (для AJAX сайтов)
);
});
</script>
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.