End of Support for Joomla 3 - Forum closed

Zum Anker Scrollen

Zum Anker Scrollen was created by Webatelier

Posted 6 years 11 months ago #17293
Hallo
Ich würde gerne mittels Menü zu einem Anker scrollen.
Wenn ich im Menüeintrag externen link auswähle und dort zum Beispiel #bottom-d eingebe dann springt er zu diesem Modul.
Wie kann ich dies in ein scrollen umändern?
Danke und Freundliche Grüße

Please Log in or Create an account to join the conversation.

Replied by Webatelier on topic Zum Anker Scrollen

Posted 6 years 11 months ago #17297
Ich habe nun folgendes versucht -leider nur bedingt erfolgreich. Das scrollen funktioniert dann aber leider funktioniert das Menü im mobilen nicht mehr.


<!-- SMOOTH SCROLL -->
<script src=" ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js ">
<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) {
$('html,body').animate({
scrollTop: target.offset().top
}, 4000);
return false;
}
}
});
});
</script>
<!-- End of SMOOTH SCROLL -->

Please Log in or Create an account to join the conversation.

Replied by joomlaplates on topic Zum Anker Scrollen

Posted 6 years 11 months ago #17298
Welches Template benutzen sie

Please Log in or Create an account to join the conversation.

Replied by Webatelier on topic Zum Anker Scrollen

Posted 6 years 11 months ago #17299
Ich benütze derzeit das Expert Template

Please Log in or Create an account to join the conversation.

Replied by joomlaplates on topic Zum Anker Scrollen

Posted 6 years 11 months ago #17300
Hallo fügen sie mal folgendes Script in ihr Template ein:
Das geht unter:
>> Template Styles > Settings > Additional Scripts ( siehe Bild
Code:
<script type="text/javascript"> jQuery(document).ready(function($) { $(".scroll").click(function(event){ event.preventDefault(); $('html,body').animate({scrollTop:$(this.hash).offset().top-70}, 900); }); }); </script>

Attachment 1-2-3.jpg not found



Nun können sie vom Menupunkt aus scrollen, hierzu benutzen sie den Link CSS Style, siehe Bild

Attachment 2-2-3.jpg not found

Attachments:

Please Log in or Create an account to join the conversation.

Replied by Webatelier on topic Zum Anker Scrollen

Posted 6 years 11 months ago #17305
Super Danke :-)) Euer Support hier ist echt Hammer!

Einzig bei dem "Home" Menü funktiniert es nicht, dass er einfach nach ganz oben scrollt.
Ausserdem brauche ich nun noch etwas, dass es beim klick auf das Logo nicht home lädt sondern auch einfach nach oben scrollt. fertig ist das perfekte OnePage Template :-)

Please Log in or Create an account to join the conversation.

Moderators: joomlaplates

Installations-Service

Don´t waste your time, we install your purchased Template
with the "Demo Content" within the next 24 hours.

Buy Now - 59€

Joomlaplates/Theme-Point is not affiliated with or endorsed by Open Source Matters or the Joomla! Project

Copyright © 2022 JoomlaPlates | Professional Joomla Templates with Uikit 3

Disclaimer & Privacy | License