Advertisement
Guest User

Hide/show "Who's who" actor images

a guest
Jul 11th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement