Andy E

United Kingdom

whattheheadsaid.com

Age: 31

I'm mainly a JavaScript coder, with some experience in other languages.

If I helped you a lot, dontations are welcome via GitTip, but just a thanks, an up vote or the green check is enough :-)

Jul
18
awarded Autobiographer
Jul
11
comment Is right click a Javascript event?
@Joe: funny how that went 32 up votes and 4 years without anyone noticing ;-) I think I can be excused, though - it was 00:30am when I wrote the answer!
Jul
11
revised Is right click a Javascript event?
edited body
Jul
9
comment How to remove the hash from window.location with JavaScript without page refresh?
@dayuloli: updated, thanks :-)
Jul
9
revised How to remove the hash from window.location with JavaScript without page refresh?
added 1 character in body
Jul
7
awarded Guru
Jul
5
awarded Nice Answer
Jul
4
comment Retrieve the position (X,Y) of an HTML element
@CpnCrunch: I see what you mean now; I didn't realise you were referring to the latter part of my answer. When the body has a margin, its bounding box will be offset by that number of pixels at each respective side. In that case, you'd also have to subtract the computed margin style from the body coordinates. It's worth noting that CSS resets remove the margin from <body>, though.
Jul
4
awarded Great Answer
Jul
2
awarded Inquisitive
Jul
2
awarded Curious
Jul
2
awarded Inquisitive
Jul
2
awarded Curious
Jul
2
awarded Curious
Jul
2
comment looping through an object (tree)
@Annan: yes, that is more or less what I was getting at. The point was simply not to do it ;-)
Jul
2
comment Retrieve the position (X,Y) of an HTML element
@CpnCrunch: which browser are you seeing that in? In my testing, meouw's code and mine return the same result no matter what the body element's margin is.
Jun
27
awarded Enlightened
Jun
27
comment Is there a way to detect if a browser window is not currently active?
@salexch: why? so it will operate some microseconds faster, because that's your personal preference, or some other pedantic reason? ;-)
Jun
26
comment JavaScript: addEventListener not running
+1 - There's also .children[0], which may or may not have better support than .firstElementChild, I can't remember :-P
Jun
25
revised Samsung SmartTV get current time
added 255 characters in body
1 2 3 4 5