jquery - offset().top doesnt count the height of chrome extention toolbar -


i trying offset top of element, appears if there kind of gooogle chrome extention toolbar - loads after page loaded in iframe , height not counted in offset().top.

i running jquery function on (window).load(), maybe not correct?

it's noticed happening. might best practice make calculations in window's onresize event:

$(window).load(function() { $(window).trigger('resize'); });  $(window).resize(function() {   // offset().top; calculation here, when window loads , each time window resized. }); 

also, post full example of code (css, html, js) in jsfiddle. have hunch .position() work better .offset(), possibly minor css/html tweaks but, can't tell without seeing code.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -