Page 1 of 1

js scroll animated - anchor websitex5 v13

Posted: Wed Apr 05, 2017 11:08 am
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>

Re: js scroll animated - anchor websitex5 v13

Posted: Thu Apr 06, 2017 10:06 am
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!

Re: js scroll animated - anchor websitex5 v13

Posted: Thu Apr 06, 2017 10:26 am
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

Re: js scroll animated - anchor websitex5 v13

Posted: Tue Apr 11, 2017 9:30 am
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!