I am working on a query that updates the text of a list item when hovering over an image. I have included an event target in the query:
$('img').on('mouseover', function(){
// I want to use an Id for the text instead of 'li'
$('li').css('text-decoration', 'underline');
});
$('img').on('mouseout', function(){
$('li').css('text-decoration', 'none');
});
Now, I would like this change to only affect items with the same Id as the image:
s[i++] = '<li id=\"'+ vizList[j].name +'\">';
s[i++] = '<a>'+ vizList[j].name + '</a>';
s[i++] = '<img id=\"'+ vizList[j].name +'\" src="../renderer/bundles/' + vizList[j].icon + '" width="268" height="120" style="display:block"/>';
s[i++] = '</li>';