Looking to implement hover detection between rows in a grid container, rather than on individual items. The number of items in the container and per row may vary.
It's important to note that the item count in the container and rows is dynamic.
The current structure of my item container is as follows:
<div class="container">
<div class="hover-placeholder"></div>
<div class="row">
<!-- Start : Items -->
<div class="col-md-3">...</div>
<div class="col-md-3">...</div>
<div class="col-md-3">...</div>
<div class="col-md-3">...</div>
...
<div class="col-md-3">...</div>
<!-- End : Items -->
</div>
</div>
I am aiming to avoid adding a placeholder element every 4th item due to varying screen sizes reducing the items per row. Instead, I have placed a single placeholder outside the grid which I plan to transform: translateY(..)
between hovered rows.
Current progress can be viewed here: https://jsfiddle.net/0t8c0h4m/
Despite my efforts so far, I seem to be getting stuck due to overthinking. Any assistance would be appreciated!
UPDATE
The aim is for the .hover-placeholder
to translate to the position between the rows upon hovering over the negative space. Clicking will create a permanent separator between the rows.
SUCCESS!
After working through the issue, I have managed to solve it. Thanks to everyone who offered their support.
Here is the finalized solution: https://jsfiddle.net/0t8c0h4m/9/