JSFiddle - React, Tailwind, and code Playground
by Andrea Scanu
HTML
<label> Please write your twitter name: <input type="text" onkeyup="checkname(this.value)"></label>
<div id="divOfInterest"></div>
<script>
function checkname (name) {
$.ajax({
url: "http://api.twitter.com/1/users/show/" + name + ".xml",
statusCode: {
404: function() {
$("#divOfInterest").html("Sorry, " + name + " is not a valid twitter account");}
}
});
}
</script>