How to achieve mouseover effect where a hover div slides in from the side

Tags: jquery,html,css

Problem :

I've been taking a look at this WordPress theme:

When a tile is hovered it seems a translucent div slides over the tile from the edge the mouse entered. I think a single div may be used for this but I'm not sure how it's acheived from looking at the page source.

I am pretty good with html and css but my jQuery is quite basic. I know this is a bit open ended but a brief explanation of the techniques involved would be helpful.

Edit: Thinking about it, without delving into the page source this is how I think the approach might work:

  1. Each tile has it's own translucent overlay child div with title on it etc.
  2. Each overlay div is positioned somewhere outside the tile div. The tile has overflow:hidden
  3. When the mouse hovers the div I use jQuery to work out which side the mouse entered (how?)
  4. I then apply a css class to the overlay div: either top, bottom, left or right. CSS will kick in to instantly position the overlay div just outside the corresponding edge of the tile div.
  5. jQuery then offsets the overlay div with animation to move it into position over the tile.

The tiles will be dynamically sized so jQuery will be needed to redefine the offset amounts depending on the tile size.

Solution :

They are using this -

I also started a CSS only version -

    CSS Howto..

    How can I use d3.js filter to assign different css classes to elements?

    Last inherited display property is inline but computed is block. How is this even possible?

    How to place the same image at the top and at the bottom of the same column?

    R shiny: How to change the width of a progress-bar

    How to reuse styles?

    Android Crosswalk Project: How to use css?

    How to create css based breadcrumb which supports IE8 [closed]

    How to make a gallery

    CSS: How do I stretch a background with a different z-index to height of page contents

    How Do I Code a Popover in Rails 4.2.5 Using gem bootstrap-sass (Bootstrap 2)?

    How to write css for that?

    How to turn off :hover with CSS?

    How to grab a CSS syntax with JavaScript?

    How to speed up a slow loading PHP page that is processing several large arrays?

    How to REALLY control font size in an eBay listing [closed]

    css - how to remove inherited style

    How do you modify wordpress css for posts?

    How to set css properties to dynamically created table?

    How to do page load in jQuery?

    How to add wikipedia in to a wordpress plugin

    how to rewrite relative url in minified css with cssmin?

    How to use active and before with CSS?

    How to convert columns to rows using CSS

    How to Style this table-like structure

    How to change CSS of child element inside parent
    element Using jQuery onclick event?

    AngularDart - How to style Component with global CSS in Google Chrome 35m (applyAuthorStyles is deprecated)

    All CSS menu when hover show submenu

    How can I center my icon horizontally and vertically?

    How to create the + button with CSS?

    How to make a border colorful using CSS?