I have blocks of information displayed in divs. I want to change the css of a particular div on hover. But currently when I hover over anyone div the css for all the divs change.
Here's my jquery code :-
<script>
$('.student-box').hover( function(){
$('.student-info').css('opacity', '0.8');
$('.student-info').css('margin-top', '-20px');
$('.student-info').css('height', '130%');
$('.onhover-ul').show();
},
function(){
$('.student-info').css('opacity', '0.7');
$('.student-info').css('margin-top', '75px');
$('.student-info').css('height', '63%');
$('.onhover-ul').hide();
});
</script>
How do I change the jquery so that only the div which is hovered upon is affected. There can be a lot of student which means lot of "student-box" will be generated.