I'm following this tutorial on making an animation like IKEA:
http://static.buildinternet.com/live-tutorials/interactive-picture/index.html
The issue I'm having is that I would like to make the information expand from right to left when somebody hovers over the image, instead of left to right.
Here is an example on jsfiddle: http://jsfiddle.net/NEHZU/1/
This is the code on jsfiddle:
CSS:
.more{ position:absolute; width:17px; height:17px; background:url('dim.png'); padding:2px; text-align:left; overflow:hidden; }
.more span{ position:absolute; left:32px; width:160px; padding:0px 0 0 0px; color:#000; font:bold 13px Lucida Grande, Arial, sans-serif; }
#test{ top:50px; left:213px;}
HTML:
<div class="more" id="test">
<a href="http://www.google.com"><img src="http://buzport.com/wp-content/uploads/2011/07/land-phone-17x17px.gif"/></a>
<span>random text</span>
</div>
JavaScript:
$(".more").hover(function(){
$(this).stop().animate({width: '225px' },200).css({'z-index' : '10'});
}, function () {
$(this).stop().animate({width: '17px', height: '17px' }, 200).css({'z-index' : '1'});
});
updated title to say Right to Left, instead of Left to Right