Comments (3)
the goal of most of my core Ender modules was to reduce the cruft that you didn't need in jQuery. getting an offsetTop from an offsetParent is simple, so I didn't include it. but in either case, are you running into a real issue with it being named offset()
? I preferred the name over position
from bonzo.
Well.. I think that jQuery's naming convention is a bit strange here... if offsetLeft in an element is the position from an offsetParent then I would assume that offset()
returns the offsets, not position()
.
Also: offsetLeft
doesn't work as expected in IE6 + IE7, so jQuery handles that for you (but I really don't need that support.. just saying that it makes sense to wrap it).
Getting the right offsets (inside offsetParent) in inline elements is also not that obvious...
from bonzo.
Also: Webkit has a very weird offset bug if an offsetParent is inline: http://jsfiddle.net/enyo/uDeZ9/ (Test it in Webkit and FF / Opera)
from bonzo.
Related Issues (20)
- $("ele").append() strips text in a mixed string. HOT 4
- toggleClass appends existing classes to className HOT 11
- Why `scrollWidth` and `offsetWidth`? HOT 1
- Add a version tag for bower HOT 4
- Add DOM Insertion, Around methods
- .focus() isn't working HOT 1
- Cannot set value of element if value is not a string
- .closest() skips origin element HOT 8
- Ender Bridge has issues with .width() and .height() on window and document. HOT 1
- Object offset() does not take margin into consideration. HOT 3
- CSS Opacity and Internet Explorer HOT 2
- .replaceWith() doesn't work when replacing a node with itself HOT 1
- Repository Command Error: version not found: 1.4.0 : bonzo/1.4.0 HOT 2
- Data method is not camelcasing hyphen separated properties HOT 2
- Window scrollTop resets scrollLeft and vice versa HOT 1
- Bower
- wrap
- bonzo doesn't specialcase "required" attr
- Only works if url does not have sub directories HOT 1
- Classie not getting included in webpack bundle. 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 bonzo.