396825
results for ""a""
-
Speaking of JS, TIL https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget I haven't done a lot with event listeners and ran into an issue where event.target was actually a child element, depending where you clicked. currentTarget should always return the element the listener is bound to. Neat.
gRegor
at
2026-07-03 17:53
-
oh for sure, but personally im 100% anti JS unless it's a web app that im working with (i use noscript basically everywhere)
WinnerWind
at
2026-07-03 17:51
-
anyway thanks for the advice! im gonna look into shrinking them a litle bit (Adding more side padding for images specfiically?) and then work on the clicking thing
WinnerWind
at
2026-07-03 17:51
-
It can be easy to mis-use, as documented on our /js;dr page :) As a progressive enhancement I think it can be OK. For photo-heavy sites, those lightboxes can be great.
gRegor
at
2026-07-03 17:51
-
im personally not a fan of js anymore, hence the new blog site
WinnerWind
at
2026-07-03 17:50
-
You could write some JS to handle something on click of an img element, but the `a href` will be the most accessible. Personally I'd only suggest JS as a progressive enhancement, like that lightbox
gRegor
at
2026-07-03 17:49
-
oh wait, i wrote the image parser so i could write a hook into it to inject classes/html
WinnerWind
at
2026-07-03 17:49
-
the new design is just a vanilla <img> tag
WinnerWind
at
2026-07-03 17:49
-
Looks like your blog already has a lightbox to show them when you click?
gRegor
at
2026-07-03 17:48
-
that would be a bit problematic because my markdown parser isn't configured to do that..... i wonder if there's a property on img itself to handle this, brb
WinnerWind
at
2026-07-03 17:47
Sort by:
Filter results by:
Tag
Query took 0.01s.
Search tips
- Exclusion
- +foo -bar
- Logical OR
- foo OR bar
- Exact phrase
- "foo bar"
- Partial words
- foo*
- Particular fields only
- title:foo
- domain:example.org
- nick:somebody
- after:2016-11-23
- before:2016-11-23
- date:2016-11-23