Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Smooth Scroll Issue - DEMO 1 - HTML


I've added a smooth scroll to one of my buttons but it does not seem to be working correctly. For some reason the website reloads instead of scrolling down to the div I have targeted.

If you also mouse over the URL, instead of showing https://www.epikescapes.com/index2.php/#get-inspired, it shows https://www.epikescapes.com/#get-inspired


<a href="#get-inspired%22%20class=%22menu-link%22%20data-kt-scroll-toggle>%0D%0A<span%20class=%22menu-custom-icon%20d-flex%20flex-center%20flex-shrink-0%20rounded%20w-40px%20h-40px%20me-3" target="_blank">
<!--begin::Icon-->
<span>
<i class="fa-solid fa-location-dot fs-2 text-warning"></i>
</span>
<!--end::Icon--></span>
<span class="d-flex flex-column">
<span class="fs-6 fw-bold text-gray-800">Africa & Middle East</span>
<span class="fs-7 fw-semibold text-muted">Kenya, Israel & More</span>
</span>
</a>


You can test it here by mousing over DESTINATIONS > AFRICA & MIDDLE EAST

https://epikescapes.com/index2.php

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi,

May I know what is your Metronic version and which build method are you using(gulp or webpack) ? and if you followed the SmoothScroll docs here it work as it works in the original theme.

Where to click to test it on your page - https://epikescapes.com/index2.php ?

Regards.



Hi Sean,

I am using v8.1.7. I am using the webpack. I downloaded the template from ThemeForest.

I did follow the steps on the mentioned page.

---------

On index2.php, mouse over DESTINATIONS at the top of the website and click on AFRICA & MIDDLE EAST. It is supposed to scroll down the page to the word SEYCHELLES under the first banner image.

If you look at the URL though, it says epikescapes.com/# instead of epikescapes.com/index2.php#

It's causing the website to reload instead of scroll down because something is removing the index2.php part of the url for some reason.



Hi Andre,

You also have to define the sub-directory (sub-file in this case).


<a href="index2.php/#get-inspired"


Just use "#get-inspired" will create a href link to the root
https://www.epikescapes.com/#get-inspired

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(