Closed epson950 closed 7 years ago
itself found the solution
jQuery(function() { //В следующей выборке так же просто можно прописать привязку на любой элемент //Сейчас "якорь" определяется по наличию символа # в ссылке jQuery('a[href*="#"]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname){ var target = jQuery(this.hash);target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']'); if (target.length) { var scrl = target.offset().top; //Получаем отступ от верхнего края var offset = 70; //Отступ от элемента в пикселях var speed = 1000; //Скорость прокрутки scrl = scrl - offset; jQuery('html, body').animate({ scrollTop: scrl }, speed); return false; } } }); });
// load CSS, less and js jquery.nav.js, smoothscroll.js, $this->helix3->addCSS('bootstrap.min.css, font-awesome.min.css') // CSS Files ->addJS('bootstrap.min.js, jquery.sticky.js, main.js') // JS Files
also we add to it loading of the necessary script
// load CSS, less and js jquery.nav.js, smoothscroll.js, $this->helix3->addCSS('bootstrap.min.css, font-awesome.min.css') // CSS Files ->addJS('bootstrap.min.js, jquery.sticky.js, anchor-smooth-scroll.js, main.js') // JS Files
Where i can download the complete set of files to make work the smoothscroll on the v2.1 of helix 3?
What files i need? Thanks
Smooth scroll scripts is loses every on each update the Helix 3 template. The JoomShaper team should add a boolean parameter like as the 'Preloader' or 'Go To Top' or 'Sticky Header' options in the Basic tab from Helix 3 template.
I made everything as in the instruction for exile, but in new helix 3 v2.1 it doesn't work, help! and the second question, such scrolling not from the menu, and from the button is necessary how to make?