jQuery(".my_container").hover(function(){
//do code
}, function(){
//do code
});
.my_container { width: 100px; height: 100px; margin: 50px; }
The code above doesn’t react to mouse over of margin (margin isn’t a part of element?) – how can I change that?
Perhaps use a 2nd wrapper element with padding on the outer element and existing background and padding styles on the inner element: