Skip to content

Instantly share code, notes, and snippets.

@felipegenuino
Created March 29, 2015 22:30
Show Gist options
  • Save felipegenuino/d5c266f2c97c965c852e to your computer and use it in GitHub Desktop.
Save felipegenuino/d5c266f2c97c965c852e to your computer and use it in GitHub Desktop.
Começando com Ajax
<script>
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(){
if(xhr.readyState === 4){
document.getElementById('ajax').innerHTML = xhr.responseText;
}
};
xhr.open('GET','sidebar.html');
xhr.send();
</script>
<body>
<div class="grid-container centered">
<div class="grid-100">
<div class="contained">
<div class="grid-100">
<div class="heading">
<h1>Bring on the AJAX</h1>
</div>
<div id="ajax">
</div>
</div>
</div>
</div>
</div>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment