Comments (7)
Actually, now that I think about it, it's doing it very wrong. It shouldn't matter if the top of the page is overlapping the container, it should be sticky anyway. It's only the bottom of the box that matters as the opposite is true for the top
aligned sticky element.
I've never used the bottom sticky element myself before, so I guess that's why I missed it.
from angular-sticky.
Hello Sean,
I'm not sure you already tried, but from the sound of it you need to use a container. A demo can be found here:
http://harm-less.github.io/angular-sticky/#!/demo/container
So make sure the container you use spans the entire section you'd like to have your element sticky.
Hopefully that will get you going.
Harm
from angular-sticky.
Hey Harm,
thanks for the quick response. Nice library btw. :)
I have tried the approach with the container, but it did not help to solve the "problem/feature".
I just made an example to show you the use case.
http://jsfiddle.net/51bsbzL0/407/
Cheers,
Sean
from angular-sticky.
Thanks for the kind words :)
I see now. It seems to fail on just one just pixel even after I've updated your fiddle with the following CSS:
html, body {
margin: 0;
}
Maybe I need to account for this one pixel in the code. I'll check it out soon.
from angular-sticky.
#32 should resolve this issue.
from angular-sticky.
@SRoddis I released a new version that includes the fix from @dotKev for issue #32. Does this fix your problem?
from angular-sticky.
@harm-less:
Hey, sorry for the late reply!
The new version fixes the Problem. Great work.
http://jsfiddle.net/51bsbzL0/407/
Thank you!
Cheers,
Sean
from angular-sticky.
Related Issues (20)
- bodyEl.scrollTop is not a function error HOT 14
- layout breaks when using ng-show HOT 4
- prevent stacking of non-overlapping sticky elements? HOT 3
- elementWidth() HOT 3
- requires jquery even though you mention its a pure javascript implementation. HOT 3
- bug with width HOT 1
- Replaces the element with a div HOT 2
- Enable redraw method for directive HOT 1
- Not sticky when at top of page (window.scrollY = 0) HOT 2
- Angular 1.5.8
- Placeholder causes the window to scroll-down when using ui-bootstrap's popover HOT 3
- Page Jumps on click HOT 1
- Placeholder height doesn't change after dynamic height change of sticky element HOT 3
- We cannot update bower HOT 2
- Sticky element position don't rerendred on resize HOT 1
- z-index is always relative to 1039
- Want it Sticky only after scrolling past other bottom elements
- All the stack and collection demos are broken HOT 1
- Need help? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-sticky.