Offset().left, offsetLeft, offset.left, what's the difference? why not use the pure js offsetLeft instead of the jQuery way?

Getting offsets can be a little tricky in some browsers offsetTop and Left are incorrect in IE 6 and below and others like offsetX and offsetY are completely inconsistent across browsers (see Quirksmode ) Generally, when a library includes some functionality even when the same functionality seems to already exist, it's usually done for cross-browser purposes As far as I can tell, using offset. Left instead of offset(). Left shouldn't even work.

The latter would be "get the left property of the object returned by the offset() function", which is what you'd want. The former, with no parentheses, would be "get the left property of the function offset which doesn't make much sense to me (unless the object whose offset property you're accessing isn't a jQuery wrapper, in which case the offset property might not be a function, but instead an object with left and top properties) But I'm not a jQuery expert.

Getting offsets can be a little tricky in some browsers. OffsetTop and -Left are incorrect in IE 6 and below and others like offsetX and offsetY are completely inconsistent across browsers (see Quirksmode) Generally, when a library includes some functionality even when the same functionality seems to already exist, it's usually done for cross-browser purposes. As far as I can tell, using offset.

Left instead of offset(). Left shouldn't even work. The latter would be "get the left property of the object returned by the offset() function", which is what you'd want.

The former, with no parentheses, would be "get the left property of the function offset", which doesn't make much sense to me (unless the object whose offset property you're accessing isn't a jQuery wrapper, in which case the offset property might not be a function, but instead an object with left and top properties). But I'm not a jQuery expert.

Normally when getting the offset using jQuery I do offset().left. My understanding is that offsetLeft is pure javascript, so why not use this over the jQuery offset(). Does it really help anything cross-browser?

And when using offset().

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions