This code has always worked in Chrome, until now v32.0.1700.76 m. Now, when I toggle the display property to inline (intending to make the element visible), it is setting both width and height of the element to -10px. It works as intended in Firefox and always has in Chrome...until now. I even tried hard-coding width and height into the .on class, but that is being overridden somehow.
<style>
.on {display: inline; width: 35px; height: 35px}
.off {display: none}
</style>
<div style="width:300px" class="featImage">
<img width="300" height="250" src="http://thumbs.fliqz.com/622f3b4c6abd4845a17ca177bc27cc95.jpg">
<div id="fav" style="width: 35px; height: 35px; padding: 10px 10px 0 0; background: red; margin: -257px 0 0 250px; float: right; position: relative; z-index: 10;"></div>
</div>
<script>
$(document).ready(function(){
$(".featImage").hover(
function () {
$('#fav').removeClass('off').addClass('on');
},
function () {
$('#fav').removeClass('on').addClass('off');
}
);
});
</script>