<script>
$(function(){
$("a.load").click(function (e) {
e.preventDefault();
$("#main").load($(this).attr("href"));
// alert("#"+($(this).attr("id")));
$("."+($(this).attr("class"))).css('border-bottom', 'solid 1px black');
$("."+($(this).attr("class"))).css('background-color', '#F5F5F5');
$("#"+($(this).attr("id"))).css('border-bottom', 'solid 2px white');
$("#"+($(this).attr("id"))).css('background-color', 'white');
});
});
</script>
Above function works as expected, despite the fact that :hover properties for one of my class stop working after calling this function. So it seems that jQuery's CSS method is overriding :hover properties. Is there a workaround for this?
I tried adding at the end of the function:
$("."+($(this).attr("class"))+":hover").css('border-bottom', 'solid 2px white');
but it doesn't help.
:hover.$("#"+($(this).attr("id")))and$(this)?#contact, second:contact. Value of attributeidwithouth#at the beginning in CSS would be perceived as an element, not id.