Created
September 28, 2016 19:22
-
-
Save bearloga/9c44441a66c5a2498577cea67346e0c9 to your computer and use it in GitHub Desktop.
Make the figures click-able in your RMarkdown=>HTML reports.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="JavaScript"> | |
$(function() { | |
/* Lets the user click on the images to view them in full resolution. */ | |
$("div.figure img").wrap(function() { | |
var link = $('<a/>'); | |
link.attr('href', $(this).attr('src')); | |
link.attr('title', $(this).attr('alt')); | |
link.attr('target', '_blank'); | |
return link; | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment