JSFiddle - React, Tailwind, and code Playground
by Couto
HTML
<a href="http://15ml.at/AJAXexample/exemplo.php?edtn=1&id=9" id="normal">Link Normal</a>
<a href="http://15ml.at/AJAXexample/exemplo.php?edtn=1&id=9" id="ajax">Link Por AJAX</a>
<div id="resultado"></div>
JavaScript
$('body').delegate('a#ajax', 'click', function(e){
e.preventDefault();
var url = $(this).attr('href');
/**
* Pedido de AJAX por GET, e que espera que o resultado seja HTML
*/
var req = $.ajax(url, {
type: "GET",
dataType: "HTML"
});
req.success(function(msg){
$('#resultado').html(msg);
})
})