-
-
Notifications
You must be signed in to change notification settings - Fork 44.1k
Help, it is not rendering the cat pics :) #4016
Copy link
Copy link
Closed
Description
Challenge Waypoint: Convert JSON Data to HTML has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
<script>
$(document).ready(function() {
$("#getMessage").on("click", function() {
$.getJSON("/json/cats.json?callback=", function( json ) {
// Only change code below this line.
json.map(function(val) {
html = html + "<div class = 'cat'>"
html = html + '<div>' + val + '</div>';
html = html + "</div><br/>"
});
// Only change code above this line.
$(".message").html(html);
});
});
});
</script>
<div class="container-fluid">
<div class = "row text-center">
<h2>Cat Photo Finder</h2>
</div>
<div class = "row text-center">
<div class = "col-xs-12 well message">
The message will go here
</div>
</div>
<div class = "row text-center">
<div class = "col-xs-12">
<button id = "getMessage" class = "btn btn-primary">
Get Message
</button>
</div>
</div>
</div>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels