-
Notifications
You must be signed in to change notification settings - Fork 320
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
Width update on resize #28
Comments
I actually don't see an instance where this isn't mandatory, as it breaks on any browser resizing. +1 for adding this into the plugin permanently. |
👍 @RoffeDH's fix works nicely. I've issued a PR to help. |
👍 |
Thanks, @RoffeDH! |
Any chance of getting this rolled in. It's pretty broken without it. I am trying to pin an error status bar but it breaks on resize. |
@RoffeDH 👍 |
if this is the issue i was having of the pinned item getting stuck in one spot on resize, my hacky fix for this is to reset it on window resize with:
|
Maybe a better way than resetting:
|
I saw in the code that it looks addressed now, however, it didn't work as expected on my end, anyone having the same issue with the latest version? and what trick does work for you? Thanks |
After a little headache I found the problem to the width. The original code is as follow:
[code]$this.css({width: $this.outerWidth();});[/code]
The issue with this is that upon re-sizing the window the pinned element wont re-size (like I wanted it to do.
So all I had to do was the following change:
[code]$this.css({width: $this.parent().outerWidth();});[/code]
Now, this might not be something you'd want to make happen on every instance, so maybe do it an option:
$('.pinned').pin({
resize: true
});
The text was updated successfully, but these errors were encountered: