in Joomla Templates by teddydebehr (200 points)
edited by teddydebehr
I´m looking for a function that will be run in a template toaster template smooth scroll to anchor !

Please help.

Thank´s from Germany

2 Answers

by lisa-west (31.1k points)

As I am unable to clearly understand your query, please elaborate it little more so that  I can clearly understand and guide you accordingly.

by bp-web (340 points)
I did use the below script that i found on

I pasted the script just before the </head> tag in the index.php file of the template and created an anchor and anchor link with JCE. This worked fine for me.

<script src=""></script>
$(function() {
  $('a[href*=#]:not([href=#])').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
      if (target.length) {
          scrollTop: target.offset().top
        }, 1000);
        return false;
<!-- End of SMOOTH SCROLL -->
by teddydebehr (200 points)
Thank´s a lot it works.
Have a nice day from Germany
Anyone interested in localization of TemplateToaster v7 in exchange of a Pro License Contact Us