Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Targeting a parent Re: Targeting a parent

#91565
OniLinkCR
Member

Hello Stand.

The problem with your proposed solution is that it over the DIV, yeah, but the button stays the same color. The objective is that when the button is hovered, the entire DIV’s border changes colors. I did achieve it using jQuery like this:


$(document).ready(function(){

$('div.entry_info').hover (
function () {

$(this).addClass('hover_border');
$(this).find('a.read_more').addClass('read_more_jquery');
},

function () {

$('div.entry_info').removeClass('hover_border');
$('div.entry_info a.read_more').removeClass('read_more_jquery');
});

});