check if $inner is hidden

In my project, when I hide the scroll part, but it still load more things.
Best regards
Thanks!