Is there a way to make a div background image expand when hovered over? What is the best approach for achieving this effect?
I am looking for a smooth animation and would prefer to use JQuery, but I am new to coding. Is there a pre-existing code that I could simply implement?
I just developed this code and it works perfectly! I hope it can be useful to others.
<img class="wooll" src="/images1" style="position: absolute; margin: 0 0 0 20px;" />
<img style="" src="/images2" class="grow"/>
$(".wooll, .grow").hover(function() {
$('.grow').animate({
'height': $(this).height() * 1.4,
'width': $(this).width() * 1.4
});
}, function() {
$('wool, .grow').animate({
'height': $(this).height() / 1,
'width': $(this).width() / 1
});
});