Skip to content

Instantly share code, notes, and snippets.

@mbenke
Created June 2, 2010 19:37
Show Gist options
  • Save mbenke/422868 to your computer and use it in GitHub Desktop.
Save mbenke/422868 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<style type="text/css">
a.test { font-weight: bold; }
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
function expandInfo(content) {
$("#infobox").html(content)
}
$(document).ready(function(){
$("#infobox > a.hasmore").click(function(event){
//alert("There is more!");
// expandInfo("<p>dummy Info</p>");
var value = 'foo'
$.ajax({
url: 'jq3.py',
data: 'par=' + value,
dataType: 'json',
type: 'get',
success: function (j) {
expandInfo(j.msg);
}
});
});
});
</script>
</head>
<body>
<div id="infobox"><a class="hasmore" href="#">More</a></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment