Thanks, Caleb, for putting this library together, it's really great.
How can I programmatically scroll to a waypoint? I'm highlighting the text in the middle of the screen
$('.waypoint').each(function(index, element) {
const waypoint = new Waypoint({
element: element,
offset: '50%',
handler: (e) => {
let $el = $(this);
let text = $el.first();
$('.expand').removeClass('expand');
// get the text span (dialogue) element
let $dialogElement = $el.find('.dialogue-text').addClass('expand');
});
});
I've been trying to use the jquery-scrollto plugin, but running into issues with webpack, so figured I'd ask here just in case there's an easy way to do it. You've obviously done a lot of work with the scrolling and positioning events.
Thanks, Caleb, for putting this library together, it's really great.
How can I programmatically scroll to a waypoint? I'm highlighting the text in the middle of the screen
I've been trying to use the jquery-scrollto plugin, but running into issues with webpack, so figured I'd ask here just in case there's an easy way to do it. You've obviously done a lot of work with the scrolling and positioning events.
Thanks.