Skip to content

Instantly share code, notes, and snippets.

@MarkPochert
Created October 24, 2011 14:11
Show Gist options
  • Save MarkPochert/1309110 to your computer and use it in GitHub Desktop.
Save MarkPochert/1309110 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$("#search_button").click(function(){
$.getJSON('http://localhost:3000/items/search?search_term=Rea', function(data) {
$('#avg_price').append(data[1].item_id)
search_data = data
})
})
});
$(document).ready ->
$("#search_button").click ->
$.getJSON "http://localhost:3000/items/search?search_term=Rea", (data) ->
$('#avg_price').append data[1].item_id
search_data = data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment