I have a list of images like this:
<ul class='blah'>
<li><img src='...' /></li>
<li><img src='...' /></li>
<li><img src='...' /></li>
<li><img src='...' /></li>
</ul>
And I have it styled to display as a horizontal list without bullet points. Kinda of like what you see on GitHub for followers (see http://github.com/chrislloyd). I'm using jQuery and jQuery UI to make these images bigger when the user hovers their mouse over it. Here's the code I've got so far:
$(".blah img").hover(
function() {
$(this).effect("size",
{ to: { width: 64, height: 64 },
origin: ['top','center'], scale: 'content' });
},
function() {
$(this).effect("size",
{ to: { width: 32, height: 32 }, scale: 'content' });
});
This works well while it is animating, but once an image reaches its maximum size the other images reflow (move out of the way). Any ideas how to do this without reflowing anything?
I tried variations of 'position: absolute;', 'position: relative', etc. on the images and the container (the <ul>
) but it didn't really make any difference.