Dynamic retrieval test
by SZJX
HTML
<button>Get results</button>
<div id="container">
</div>
JavaScript
var button = $("button")
// handle click and add class
button.on("click", function(){
$.ajax({
type: 'GET',
url: "https://babe-backend.herokuapp.com/api/retrieve_experiment/1",
crossDomain: true,
success: function (responseData, textStatus, jqXHR) {
$("#container").text(JSON.stringify(responseData));
}
});
})