Reputation: 7176
I know I'm missing a small piece of this ... but for markup like this:
<a class="menusegment"><div>Link Text & Link Description</div></a>
I have the following jquery
$('a.menusegment').hover(function () {
// insert code here
});
What I want to do is change the top border color of the div contained in 'a.menusegment'
Any help would be greatly appreciated.
Thanks!
Upvotes: 1
Views: 1443
Reputation: 44
$(function(){
$('a.menusegment').hover(function () {
var thisNode = $(this);
thisNode.children('div').css('border-top', '1px solid #f60');
});
});
Upvotes: 3
Reputation: 887
If i understand your question... You dont need any kind of js
In CSS:
a.menusegment:hover div{
border-top:solid red 1px;
}
Upvotes: 2
Reputation: 31033
$('a.menusegment div').hover(function (e) {
e.stopPropagation();
// change color here
},
function(){
//code to execute on mouseleave
}
);
Upvotes: 2