I have following code, and what I am doing here is adding an inline style for background-color, and its working fine as well, but what my requirement is, when I mouseover on the div containerLink
it should remove the inline style which I have added using the following and when mouseout, it should add that style attribute back with the value it has previously.
Can somebody suggest how to add the hover functionality?
$(window).on("load resize scroll",function(){
$(".containerLink").each{(function(index, eles){
var alphaVal = $(elem).attr('backgroundOpacity');
if(alphaVal && alphaVal != '100')
$(elem).css('background-color','');
$(elem).css('background-color', funtion(index, value){
if (value === 'rgba(0,0,0,0)'){
return value;
}
if(value.match(/\d+, \d+, \d+/g) != null){
var RGBValue = value.match(/\d+, \d+, \d+/g)[1];
return "rgba(" + RGBValue + "," + alphaVal + ")";
}
});
}
)}
});