User:Najzere/spoilerimage.js

$(document).ready(function { $('div.spoilerimage').each( function { var spImage=$(this).children('img').first; $(this).css({     width: spImage.css('width'),      height: spImage.css('height'),      background: "url('http://cdn.wikimg.net/strategywiki/images/6/60/NajzereTestSpoilerImage.png') repeat"    }); spImage.css('display','none'); $(this).attr({     onMouseOver: '$(this).children("img").css("display","block")',      onMouseOut: '$(this).children("img").css("display","none")'    }); }); });