JSFiddle - React, Tailwind, and code Playground
HTML
<a href="alcohol_calculator.php" class="swfselector1">
» Alcohol unit calculator prototype <img class="tab" src="http://www.fordesigner.com/imguploads/Image/cjbc/zcool/png20080526/1211807339.png" width="30" height="28" alt="1" /> <img class="tab" src="http://www.fordesigner.com/imguploads/Image/cjbc/zcool/png20080526/1211807339.png" width="30" height="28" alt="2" /><img class="tab" src="http://www.fordesigner.com/imguploads/Image/cjbc/zcool/png20080526/1211807339.png" width="30" height="28" alt="3" /> <img class="tab" src="http://www.fordesigner.com/imguploads/Image/cjbc/zcool/png20080526/1211807339.png" width="30" height="28" alt="5" />
</a>
<a href="bouncing_ball.php" class="swfselector2">
» Bouncing ball animation <img class="tab" src="http://www.fordesigner.com/imguploads/Image/cjbc/zcool/png20080526/1211807339.png" width="30" height="28" alt="3" />
</a>
JavaScript
var done1 = 0;
$('a.swfselector1').live('hover', function() {
if(done2 != 1){
$(this).find('.tab').each(function() {
$(this).attr("src",
$(this).attr("src").replace(".png", "o.png"));
done1 = 1;
})
}
});
var done2 = 0;
$('a.swfselector2').live('hover', function() {
if(done2 != 1){
$(this).find('.tab').each(function() {
$(this).attr("src",
$(this).attr("src").replace(".png", "o.png"));
done2 = 1;
})
}
});