Guest User

Replace each image with equal sized text container

a guest
Apr 24th, 2013
321
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. $("img").each(function(){
  3.     $(this).replaceWith($("<div>Textbaustein</div>").css({
  4.         width:$(this).css("width"),
  5.         height: $(this).css("height"),
  6.         backgroundColor: "#333",
  7.         color:"#fff",
  8.         cursor: "pointer",
  9.         textAlign: "center"
  10.     }).click(function(){
  11.     location.href="http://google.de/"
  12.     }));
  13. });
  14. </script>
RAW Paste Data