im trying to make a border to a image when i Hover it but it dont add it :S but i have try console.log and it show the text i have write but it dosent add the class to it :S
This is my code
<style>
.test {
border: 1px solid #000;
}
</style>
// add a class to the image that is focus on
$('#small-image .thumb').hover(function() {
$(this).addClass('test');
console.log('hover');
}, function() {
$(this).removeClass('test');
console.log('out');
});
Why do you need javascript for this?
Markup:
CSS:
working example: http://jsfiddle.net/JndDd/