You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`
e.preventDefault();
var target = '.'+$(this).data('target');
var left = $(target).position().left;
var total = $('.front.scroll').width();
var perc = left / (total - $(window).width()) * 100;
var height = $('html').height();
var final = ((height - $(window).height())/ 100 * perc);
$('html, body').animate({scrollTop: final}, 500);
`
Scrolls the selected item to the left corner.
How to scroll to the element center?
var perc = left / (total - ($(window).width()+ $(target).width)/2 ) * 100;
Does not do the trick
BR
The text was updated successfully, but these errors were encountered:
Hi,
`
e.preventDefault();
var target = '.'+$(this).data('target');
var left = $(target).position().left;
var total = $('.front.scroll').width();
var perc = left / (total - $(window).width()) * 100;
`
Scrolls the selected item to the left corner.
How to scroll to the element center?
var perc = left / (total - ($(window).width()+ $(target).width)/2 ) * 100;
Does not do the trick
BR
The text was updated successfully, but these errors were encountered: