JSFiddle - React, Tailwind, and code Playground

by hamix

HTML

<a href="http://html.net/tutorials/php/lesson3.php">Tutorial!</a>
<div id="exUrl">
</div>

CSS

#exUrl{
    border:1px solid #aaa;
    margin:10px;
    padding:5px;
    width:600px;
    height:800px;
    display:none;
}

JavaScript

$(document).ready(function() {
    $('a').click(function(event) {
        event.preventDefault();
        alert($(this).attr("href"));
        $("#exUrl").load($(this).attr("href"),function(response, status, xhr) {
    if (status == "error") {
        var msg = "Sorry but there was an error: ";
        alert(msg + xhr.status + " " + xhr.statusText);
      }
}).show();
    });
});