JSFiddle - React, Tailwind, and code Playground

HTML

<a href="http://i33.tinypic.com/2i1f3bp.jpg">click for fun</a>

CSS

body, html {
    height: 100%;
}
div#shadow {
    position: fixed;
    top:0;
    left:0;
    bottom:0;
    right: 0;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
}

div#fancybox {
    position: absolute;
    min-width: 400px;
    min-height: 400px;
    left: 50%;
    top: 50px;
    margin: 0 0 0 -200px;
    background: #ddd;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    border: 3px solid #fff;
}

JavaScript

$('a').click(function(){
    var that = $(this)
    var html= that.attr('href')
    $('body').append('<div id="shadow"><div id="fancybox"><img src="' + html +'" alt="pic" /></div></div>')
        $('#shadow').click(function(){
            $(this).remove()
        })
    return false;
})