Thursday, 12 September 2013

Change Div Outline onmouse over

Change Div Outline onmouse over

I am having trouble working with the css and javascript for this... I have
several <div> with class="item". What I want to do is change the outline
of thie that triggered the action on hover.
I have this CSS:
.item{
width: 118px;
height: 98px;
float: left;
margin: 2px;
background-color:#FFF;
outline: 3px solid transparent;
}
and this javascript which i found from google
$('.item').hover(function(){
$(this).css('outline','3px solid blue');
},
function(){
$(this).css('outline','3px solid transparent');
});
Please help me with this...

No comments:

Post a Comment