Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mui scroll 滚动时,获取scrollTop距离是NAN或者出现一大串字符串 #503

Open
SLlife opened this issue Jun 5, 2020 · 0 comments

Comments

@SLlife
Copy link

SLlife commented Jun 5, 2020

监听scoll

let _scroll = mui('#offCanvasContentScroll').scroll();

        document.getElementById('offCanvasContentScroll').addEventListener('scroll', function (e) {  
            sessionStorage.setItem('_scroll', _scroll.y);  
        })

滚动的距离值为NaN或者-301-15-63-56-3 一大串字符串

mui('#offCanvasContentScroll').scroll().refresh();
mui('#offCanvasContentScroll').scroll().scrollTo(0, _scroll,0);//_scroll 为滚动的距离

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant