Skip to content

Instantly share code, notes, and snippets.

@g-k
Created August 29, 2012 01:04
Show Gist options
  • Save g-k/3505792 to your computer and use it in GitHub Desktop.
Save g-k/3505792 to your computer and use it in GitHub Desktop.
stackoverflow answer snippet
<!DOCTYPE html>
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script>
// $.noConflict();
window.setInterval(getAjax, 3000);
// This is getting hoisted
function getAjax() {
$.ajax({
type: "POST",
url: '/index',
data: "some-data"
});
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment