Apr
20
awarded Yearling
Apr
20
awarded Yearling
Apr
10
awarded html5
Mar
30
comment jQuery check if target is link
@Cristy thanks to jquery it should work in any browser. You may not see a wide gap in performance on really old browsers though that don't support matches.
Mar
30
revised jQuery check if target is link
added 221 characters in body
Mar
30
comment jQuery check if target is link
can't seem to get jsperf to let me add more test cases but you can see the test for a matching nested element: jsperf.com/a-or-in-a I suspect the gap should widen for deeply nested element, particularly those that are not nested within an a.
Mar
30
comment jQuery check if target is link
@cristy is should just use matches in supporting browsers. That is a single call for just the element instead of parsing up the dom checking each element. I'll create a jsperf and update the answer.
Mar
28
answered jQuery "hasParent"
Mar
28
answered jQuery check if target is link
Mar
28
awarded Guru
Mar
11
comment For creating queue and queue not recieving correct variable
Possible duplicate of JavaScript closure inside loops – simple practical example
Mar
6
awarded Good Answer
Mar
1
comment CSS Selectors - change width if last image id is X
Right, the other elements are contained within the blockquote so it needs to be first.
Feb
29
awarded Nice Answer
Feb
29
revised CSS Selectors - change width if last image id is X
added 194 characters in body
Feb
29
answered CSS Selectors - change width if last image id is X
Feb
18
awarded Enlightened
Feb
6
comment Java 8: Create tuples from Java List
You should update your answer with this. I believe the % happens first so the filter will filter out every item leaving an empty stream.
Feb
6
comment Stopping fixed position scrolling at a certain point?
@bonestarr Considerably more complicated than this one. You should expand it to multiple lines of code or it's really hard to understand. jsfiddle.net/Hf5wH/139
Feb
4
comment Stopping fixed position scrolling at a certain point?
@BoneStarr that's a bit more complex. You would need to compare the current scrollTop with the height of the page and the viewport. Then you would simply use the same code above, except with bottom and this calculated value (offset by 250) in the max.
1 2 3 4 5