JSFiddle - React, Tailwind, and code Playground

by Michele Marcucci

HTML

<li class="scroll_btn"><a id="abt" href="#">About</a></li>
<div id="render"></div>

JavaScript

$(document).ready(function () {

    $('#abt').click(function () {
        $.ajax({
            url: "http://ipinfo.io/json/", // should be "about.php" just to check it works
            success: function (response) {
                alert('CLICKED!');
                $('#render').html(JSON.stringify(response));
            },
            fail: function (err) {
                alert(err);
            }
        });
    });

});