I'm having trouble changing the hover effect background-color
on the tweets of this page:
Despite my efforts, all the links except for the latest tweets are working perfectly. What am I missing?
Here's what I've been trying...
<script>
if(sessionStorage.getItem("visited") != "true"){
var colors = Array("#A3F8EF", "#FF7275", "#CBB6E7", "#FF9D74", "#FDF874"), idx;
idx = Math.floor(Math.random() * colors.length); // Choose random index
sessionStorage.setItem("colour", colors[idx]);
newColour = sessionStorage.getItem("colour");
}
newColour = sessionStorage.getItem("colour");
$("div.tweets_txt a").hover(function(){
$(this).css("background-color", newColour+"!important");
}, function() {
$(this).css("background-color","transparent");
});
sessionStorage.setItem("visited", "true");
</script>