uncleflo

profile picture

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

Registered since September 28th, 2017

Has a total of 4246 bookmarks.

Showing top Tags within 1 bookmarks

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


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.