uncleflo

profile picture

Some cool dude. Higher order of decision making. Absolute.

Registered since September 28th, 2017

Has a total of 4281 bookmarks.

Showing top Tags within 1 bookmarks

howto   information   development   guide   reference   administration   design   website   software   solution   online   service   product   business   uk   tool   company   linux   code   server   application   system   web   list   video   marine   create   data   experience   tutorial   description   explanation   learn   technology   build   article   blog   world   project   boat   download   windows   lookup   security   free   performance   javascript   technical   london   beautiful   control   network   tools   support   course   file   research   purchase   image   library   programming   youtube   example   php   install   construction   opensource   community   html   quality   computer   feature   profile   power   browser   music   platform   process   mobile   work   user   share   manage   professional   database   hardware   buy   industry   advice   internet   dance   developer   installation   3d   camera   search   access   customer   material   travel   standard   money   test   develop   review   documentation   css   photography   engineering   webdesign   engine   device   digital   speed   event   api   source   management   program   question   client   phone   discussion   content   simple   water   story   marketing   yacht   app   account   setup   interface   package   idea   fast   communication   compare   cheap   script   market   study   easy   live   google   resource   operation   contact   demonstration   startup  


Tag selected: ie.

Clear all

Showing 1 results.

Looking up ie tag. Showing 1 results. Clear

Stackoverflow - offsetTop vs. jQuery.offset().top

https://stackoverflow.com/questions/6777506/offsettop-vs-jquery-offset-top

Saved by uncleflo on May 9th, 2018.

I have read that offsetLeft and offsetTop do not work properly in all browsers. jQuery.offset() is supposed to provide an abstraction for this to provide the correct value xbrowser. What I am trying to do is get the coordinates of where an element was clicked relative to the top-left of the element. Problem is that jQuery.offset().top is actually giving me a decimal value in FFX 3.6 (in IE and Chrome, the two values match). http://jsfiddle.net/htCPp/ exhibits the issue. If you click the bottom image, jQuery.offset().top returns 327.5, but offsetTop returns 328. I would like to think that offset() is returning the correct value and I should use it because it will work across browsers. However, people obviously cannot click decimals of pixels. Is the proper way to determine the true offset to Math.Round() the offset that jQuery is returning? Should I use offsetTop instead, or some other method entirely?

offset top left position development code abstract browser coordinate element jquery js javascript pixel chrome ie firefox crossbrowser stackoverflow problem solution


No further bookmarks found.