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.
Feb
2
comment Is there any way to colorize a white PNG image with CSS only?
@sussan It seems newer firefox doesn't work with mask if the svg used is hidden. I updated the answer to instead set the width and height to 0 rather than hide it. Seems to work fine for me.
Feb
2
revised Is there any way to colorize a white PNG image with CSS only?
deleted 131 characters in body
Jan
28
awarded Nice Question
Jan
22
awarded Yearling
Jan
22
awarded Yearling
Jan
21
comment Jquery - Selecting a item by ID not working
It would seem that your #amountID element doesn't actually exist. Are you sure it's really there? Try alerting document.getElementById("amountID")
Jan
20
comment Pure CSS navbar :Hover on List not staying
You can't have a gap between the link and the sub-menu or when you move your mouse into the gap the sub-menu will hide.
Jan
19
awarded Guru
Jan
3
accepted jQuery .closest default context
Jan
3
comment jQuery .closest default context
@adeneo Yup, I think we're on the same page. Thanks. I thought it was broken but needed someone to bounce it off of. Your answer (and discussion) were very helpful. I'll submit a bug report. They either need to change the documentation and remove this.context from pos, or make the non-pos version use this.context too.
Jan
3
comment jQuery .closest default context
It looks like matchesSelector tries to use the browser's native matches. Of course matches won't work with things like :gt which are created by jquery so matchesSelector cant' be used if that is part of the selector. So the pos thing is for those edge cases. The edge case code uses context as documented, the simple case (browser supported selector) doesn't
Jan
3
comment jQuery .closest default context
Seems almost like matchesSelector doesn't work for these matched by the regex so it gets the set first and checks if it is contained within. If it doesn't match the regex then it uses matchesSelector.
Jan
3
comment jQuery .closest default context
@adeneo actually, looking at it, the use of context is actually in the loop condition whereas pos is doing something else entirely. It seems like some additional check is needed when that regex matches (and maybe rightfully so) but that the loop condition is the actual bug
Jan
3
comment jQuery .closest default context
Thanks adeneo, I had a really quick look at the source last night but hadn't gotten to the point of looking at what rneedsContext was actually doing. Now I'm curious what they're actually trying to do there. I might skim the overall jquery source to see where else they use it to see why it's needed.
Jan
3
asked jQuery .closest default context
Dec
31
awarded Enlightened
Dec
31
awarded Nice Answer
1 2 3 4 5