Skip to content

Instantly share code, notes, and snippets.

@rtanglao
Created August 22, 2010 05:28
Show Gist options
  • Select an option

  • Save rtanglao/543368 to your computer and use it in GitHub Desktop.

Select an option

Save rtanglao/543368 to your computer and use it in GitHub Desktop.
sample GS JQUERY Code
<!DOCTYPE html>
<html lang="en">
<body>
<b></b>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script>
// Sample code to retrieve a Get Satisfaction Topic using HTTP GET and
// JQUERY and display the Subject of the Topic in Bold
(function($){
// get a Get Satisfaction topic, AFAIK "callback="?" is not documented
// anywhere on the Get Satisfaction Developer site
$.getJSON("http://api.getsatisfaction.com/topics/message_composition_with_tags_instead_of.json?callback=?",
function(data){ //data is the JSON object from getsatisfaction
jQuery('b').text(data.subject);
});
})(jQuery);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment