hlfan left a comment (openstreetmap/openstreetmap-website#7142)

Well, jQuery only does global operations unless constrained. So many, many 
places do these implicitly without being needed at all.
So the explicitness of one vs. multiple targets is something that I'd prefer.
And some custom aliases could even remove some jQuery awkwardnesses:
```javascript
$("#long_link").attr("href", link);
OSM.$("#long_link").href = link

$("meta[name=matomo-goal]").each(function () {
  matomoTracker.trackGoal($(this).attr("content"));
});
OSM.$$("meta[name=matomo-goal]")
  .map(meta => meta.content)
  .forEach(matomoTracker.trackGoal)

$(this).is(":checked")
this.checked
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/7142#issuecomment-4664967046
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/issues/7142/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to