JSFiddle - React, Tailwind, and code Playground
by mazzzzz
HTML
<img src="http://www.ct4me.net/images/dmbtest.gif" class="rollover" />
JavaScript
var RolledOver = new Array();
$('.rollover').mouseover(function ()
{
var ind = $(this).index();
if (!(ind in RolledOver))
RolledOver[ind] = false;
//alert("oveR");
if (RolledOver[ind])
{
RolledOver[ind] = false;
RollOff ($(this));
}
else
{
RolledOver[ind] = true;
RollOn ($(this));
}
});
function RollOn (t)
{
$(t).css('border','solid 1px black');
}
function RollOff (t)
{
$(t).css('border','');
}