Want more features on Pastebin? Sign Up, it's FREE!
Guest

Hide/show "Who's who" actor images

By: a guest on Jul 11th, 2012  |  syntax: JavaScript  |  size: 0.46 KB  |  views: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <script type="text/javascript">
  2.         require(['jquery-1'], function ($) {
  3.                 $(document).ready(function () {
  4.                         $("span.depiction > img").hide();       // would be better if the images were defined as hidden to start with, then we wouldn't need this line
  5.                         $("span.depiction").css("text-align", "center").append("<br/><br/><span>click to toggle actor image</span>").click( function (event) {
  6.                                 $(this).children().toggle();
  7.                                 return false;
  8.                         });
  9.                 });
  10.         });
  11. </script>
clone this paste RAW Paste Data