My goal is to change the direction of the hover based on the size of the container. If there isn't enough room for the hover effect to appear on the right side, then it should show on the left.
For more details, check out this fiddle:
http://jsfiddle.net/jHgkp/3/
I am using the hoverIntent plugin, but you can find all the specifics on the provided Fiddle link.
$(document).ready(function(){
$(".discover").hoverIntent({
over: makeVisible,
out: makeInvisible,
timeout: 200
});
}); // close document.ready
function makeVisible() {
$(this).find('ul').fadeIn(100);}
function makeInvisible() {
$(this).find('ul').fadeOut(300);}