JSFiddle - React, Tailwind, and code Playground
HTML
<div id="kwick">
<ul class="kwicks">
<li><a class="kwick john" href="http://en.wikipedia.org/wiki/John_lennon" title="John Lennon"><span>John Lennon</span></a></li>
<li><a class="kwick paul" href="http://en.wikipedia.org/wiki/Paul_mccartney" title="Paul McCartney"><span>Paul McCartney</span></a></li>
<li><a class="kwick george" href="http://en.wikipedia.org/wiki/George_harrison" title="George Harrison"><span>George Harrison</span></a></li>
<li><a class="kwick ringo" href="http://en.wikipedia.org/wiki/Ringo_starr" title="Ringo Starr"><span>Ringo Starr</span></a></li>
</ul>
</div>
CSS
#kwick { width:590px; }
#kwick .kwicks { height:143px; list-style-type:none; margin:0; padding:0; }
#kwick li { float:left; }
#kwick .kwick { display:block; cursor:pointer; overflow:hidden; height:143px; width:134px; }
#kwick .kwick span { display:none; }
#kwick .john { background:url(http://davidwalsh.name/dw-content/kwicks/john.gif) no-repeat; }
#kwick .paul { background:url(http://davidwalsh.name/dw-content/kwicks/paul.gif) no-repeat; }
#kwick .george { background:url(http://davidwalsh.name/dw-content/kwicks/george.gif) no-repeat; }
#kwick .ringo { background:url(http://davidwalsh.name/dw-content/kwicks/ringo.gif) no-repeat; }
JavaScript
var Kwix = {
start: function(){
Kwix.parseKwicks();
},
parseKwicks: function(){
var squeeze_to = 100;
var max_width = 285;
//get original widths
var start_widths = new Array();
var kwicks = $$('#kwick .kwick');
var fx = new Fx.Elements(kwicks, {wait: false, duration: 250, transition:Fx.Transitions.Cubic.easeOut});
kwicks.each(function(kwick, i){
start_widths[i] = kwick.getStyle('width').toInt();
//mouse is in, squeeze and expand
kwick.addEvent('mouseenter', function(e){
var obj = {};
obj[i] = {
'width': [kwick.getStyle('width').toInt(), max_width]
};
var counter = 0;
kwicks.each(function(other, j){
if (other != kwick){
var w = other.getStyle('width').toInt();
if (w != squeeze_to) obj[j] = {'width': [w,squeeze_to] };
}
});
fx.start(obj);
}
);
});
//mouse is out, squeeze back
$('kwick').addEvent('mouseleave', function(e){
var obj = {};
kwicks.each(function(other, j){
obj[j] = {'width': [other.getStyle('width').toInt(), start_widths[j]]};
});
fx.start(obj);
});
}
};
//lock and load!
window.addEvent('domready',Kwix.start);