Trying to select anchor tags that are a descendants of a div with a particular id, say it is #mydiv1, #mydiv2 and #mydiv3.
myFunction = function() {
var theDivs = $("#mydiv1, #mydiv2, #mydiv3");
theDivs.hover(function(e){
$(this+" a:link").css("color","#99ccff");
},function(e){
$(this+" a:link").css("color","#848484");
});
}
The selector $(this+" a:link") doesn't seem to be selecting anything though.
Does anyone have any thoughts on the proper syntax for this selection?