js scroll animated - anchor websitex5 v13

Join us! Share tips and solutions with WebAnimator users around the world.
Locked
Danci0
Posts: 3

js scroll animated - anchor websitex5 v13

Post by Danci0 »

I combine the scripts so the scroll is animated, I mean the anchor for wesitex5v13

location.replace("http://www.google.com");

$('a[href^="#"]').on('click', function(event) {
var target = $(this.getAttribute('href'));
if( target.length ) {
event.preventDefault();
$('html, body').stop().animate({
scrollTop: target.offset().top
}, 1000);
}
});

Or create a script with code from wesitex5v13

<a href="opis.html#Bp1" class="imCssLink" onclick="return x5engine.utils.location('opis.html#Bp1', null, false)">OpisBp1</a>

ICC
Posts: 486

Post by ICC »

Hello Danci0,

Do you refer to an animation made with WebAnimator?
If it's a request for WebSite X5 then you need to contact the support of WebSite X5 available on https://helpcenter.websitex5.com

Many thanks!

Danci0
Posts: 3

Post by Danci0 »

From what I've been trying to do, it's possible to do it with an ordinary code.

Location.replace ("http://www.google.com");

$ ('A [href ^ = "#"]'). ('Click', function (event) {
Var target = $ (this.getAttribute ('href'));
If (target.length) {
Event.preventDefault ();
$ ('Html, body'). Stop (). Animate ({
ScrollTop: target.offset (). Top
}, 1000);
}
});

But I'm not ready to do it.
All you need is an ordinary autoscroll created in js to "http link" that will work in webanimator.

Thank you in advance for your help

ICC
Posts: 486

Post by ICC »

Hello Danci0,

Can you please show me an example of what you refer?

What exactly do you want to animate in a project made in WebAnimator?

Many thanks!

Locked