Quantcast
Channel: Planet Ubuntu
Viewing all articles
Browse latest Browse all 17727

Raphael Pinson: Getting block position in Javascript with Chrome

$
0
0
Dear Lazyweb,

Yesterday, I had fun implementing a little ducky that hides on the pages of this website. To my distress, I ended up having to hardcode a few things, since I couldn't get Chrome to properly give me the real position of relative blocks. After reading quite a few things on the subject, I went the parentOffset recursive way, but it just doesn't seem to work.

I've also posted on StackOverflow here if you feel like answering me there.

Does anyone know of a cross-browser way of getting real block positions that actually works?

Viewing all articles
Browse latest Browse all 17727

Trending Articles