kswedberg/jquery-smooth-scroll

How to refresh on dom changes?

ejooo opened this issue · 2 comments

I'm using jquery mixit plugin on portfolio which removes and adds elements. After the mixit filters smooth-scroll highlights incorrect links. How to fix that? Is there any utility function to call after dom changes? I didn't found in the docs.

I'm not familiar with the mixit plugin, but if it removes elements (and the elements' events) and then adds them back or adds new ones, you'll probably need to call smoothScroll on the affected elements after things are removed/added. From a quick glance at the mixitup plugin documentation, I see that it has an onMixEnd callback function (https://github.com/patrickkunka/mixitup/blob/master/docs/configuration-object.md#callbacksonmixend). That's probably what you'll want to use.

Closing this due to inactivity.