i have this working ajax code:
$(function(){
$('#post-list a').click(function(e){
var url = $(this).attr('href');
$('#ajax-div').load(url+ " #post");
e.preventDefault();
});
});
how do i convert it to plain JavaScript without jquary, or any other libraries? i believe it has something to do with XMLHttpRequest.
Aucun commentaire:
Enregistrer un commentaire