I did the same as the tutorial yet I can't get it work. Basically, It's a jQuery plugin that detects the direction that you're coming from with the mouse.
This is the tutorial (Codrops): http://tympanus.net/codrops/2012/04/09/direction-aware-hover-effect-with-css3-and-jquery/
And my code: http://jsfiddle.net/hk73k/1/
You'll see that there are 3 li's, but only one alert message. So I guess it's something with the JS code.
.da-thumbs li {
float: left;
margin: 5px;
background: #fff;
padding: 8px;
position: relative;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.da-thumbs li a,
.da-thumbs li a img {
display: block;
position: relative;
}
.da-thumbs li a {
overflow: hidden;
}
.da-thumbs li a div {
position: absolute;
background: rgba(75,75,75,0.7);
width: 100%;
height: 100%;
}
$(function () {
$(' #da-thumbs > li ').each(function () {
alert('I should be shown 2 more times!');
$(this).hoverdir();
});
});
I'm so frustrated. What did I do wrong?