-
Notifications
You must be signed in to change notification settings - Fork 380
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
Constant resize when expand: true #481
Comments
As a follow-up, for some reason which I still can't explain, if I add !important to the height declaration on .anythingSlider this issue no longer occurs. Baffled even more, now. |
Hi @IamFriendly! Great! Thanks for the screen cast! It really did help! Hmm, well it does look like a bug. What is happening is that the slider is actually checking it's parent element size instead of the browser window resize event. It does this check every 500 milliseconds. The problem is that it's clearing the window size, setting all elements to the same width and height (not taking into account the I'll work on cleaning this function up. I'm not sure why I didn't bind to the element resize event, but I will fix that and throttle the resize as well. It may end up being a little jumpy, but it shouldn't recheck the size constantly like it was. |
Hmm, I take that back.. in the expand demo in Chrome and Firefox, the check still occurs every 500 milliseconds, but it doesn't update the sizes because they all match. I'm still going to rewrite the function to use the resize event so we'll see what happens after ;) |
No worries @Mottie, I first tried explaining it by simply writing it and, well, that didn't end well. I didn't understand my own problem after I wrote it down, haha. A screenshot didn't seem appropriate either. I understand your explanation but I'm not really sure why adding the !important declaration 'solves' it. Anyway, glad I could help and good luck solving it. If you need anyone to test anything, give me a shout. Rich |
Actually, it must be because it's Saturday... I wrote this initially, but questioned my own memory LOL. There is no But I wonder if the problem you're having is because you didn't set a fixed height for the wrapper around AnythingSlider.... something like: #themeists_twitter-2 {
height: 100px; /* or whatever to accommodate the h4 as well */
} |
In 1.9.2 w/ jQuery 1.10.1 this is still an issue. Same thing: panel width and height constantly keep updating to the same (respective) value. I have used the slider often and this is the first time I've seen this issue. The difference between this project and all the previous ones is that I'm using percentage widths and rem heights. Since @IamFriendly is using percentage widths as well, this is likely a factor, if not the cause. Setting a height for the wrapper does help, though in my opinion it shouldn't be necessary and it's doable to fix it in the code. But so long as it isn't, please document it somewhere (or have I missed it?). Adding a height w/ !important to .anythingSlider fixes it as well (thanks for sharing @IamFriendly). |
Stumbled upon this issue as well, adding a wrapper and set a height on the wrapper (any value) get rid of the issue. |
Right then, this is firmly in the 'what the hell is going on here' category. So much so, I've recorded a screencast to try and explain. I've placed all my css/js at the end of the screencast, but for completeness, here it is,
Using jquery v1.8.3 and anythingSlider v1.8.9
Screencast can be seen at: https://dl.dropbox.com/u/455309/anythingslider.mp4
I'm baffled. I've almost certainly missed something, but honestly can't see what it is.
The text was updated successfully, but these errors were encountered: