Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Make the figures click-able in your RMarkdown=>HTML reports.
<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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment