Home › Forums › CSS › Targeting a parent › Re: Targeting a parent
November 29, 2011 at 6:31 pm
#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');
});
});