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

Overwriting style attribute on iOS #15

Open
bostondv opened this issue Sep 18, 2014 · 1 comment
Open

Overwriting style attribute on iOS #15

bostondv opened this issue Sep 18, 2014 · 1 comment

Comments

@bostondv
Copy link

On iOS devices Scroll Up Bar overwrites an existing style attributes on the bar element. I believe in this section of code at line 138.

$bar.css({
    'position': 'absolute',
    'top': lastY > minY ? lastY : initialPosTop
});

The problem it causes in our case is that we use jQuery's show() and hide() method on the bar and scroll up bar is overwriting those attributes.

Could it be changed to replace only the position and top attributes and retain any others already existing?

@eduardomb
Copy link
Owner

I think what causes the problem is that the plugin uses slideUp() and slideDown() on iOs. Those methods change the display property originally set by your show() and hide().

You can work around it by destroying the plugin with $.scrollupbar.destroy() at the same point you call hide() on your code and initializing it again at the same point you call show().

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

2 participants