Created
November 25, 2014 21:01
-
-
Save pgbovine/21dd0f2024fcd317baf4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy into profile.html | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$("#getData").click(function() { | |
$.getJSON('/lotsofdata', function(dat) { | |
console.log("Ajax received data!"); | |
console.dir(dat); | |
}); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
{% if name %} | |
<h1 style="color: red;">Hello, {{ name }}!</h1> | |
{% else %} | |
<h1>Hello noname!</h1> | |
{% endif %} | |
<button id="getData">Get Data</button> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment