You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This started as something for scaling background in bspweb. It simply adds a class to a given DOM element whenever any of its child items is on hover. This is useful because sometimes you want to apply css effects on the parent item when it's hovered, but passing over child items might make it lose the ":hover" meta state.
varmirageViewsRowClass='.mirage-views-row-hover .views-row';$(mirageViewsRowClass).bind('mouseenter',function(e){$(e.target).closest('.views-row').addClass('row-hovered');});$(mirageViewsRowClass).bind('mouseleave',function(e){$(e.target).closest('.views-row').removeClass('row-hovered');});```
Thenhadtoimplementsomethingsimilar(equalexceptfortheclassnames)forparagraphs,duplicatingcode.It's something rather trivial but will be probably common.
Having a class makes it easier to target states within CSS, and also to keep it in line
with BEM naming conventions.
Use this ticket to incorporate this logic, but also to start a simple but
dev-friendly way to see usage, what JS utilities we have, etc.
The text was updated successfully, but these errors were encountered:
This started as something for scaling background in bspweb. It simply adds a class to a given DOM element whenever any of its child items is on hover. This is useful because sometimes you want to apply css effects on the parent item when it's hovered, but passing over child items might make it lose the ":hover" meta state.
The text was updated successfully, but these errors were encountered: