I have a workaround for your problem.
Add the img class just like the hover pseudo-class:
img:hover, img.hover{ margin-left: 10px; }
Bind mouseover and mouseout events to h3 element:
$('h3').on({ 'mouseover': function() { $(this).prev('p').find('img').addClass('hover'); }, 'mouseout': function() { $(this).prev('p').find('img').removeClass('hover'); } });
fiddle
source share