This page of my app is a dashboard which consists of div's acting as 'panels', like so
<div class='panel' id='usersPanel' data-request='users'>
<h1>Users</h1>
<p class='panel-contents'>Will be filled with AJAX results</p>
</div>
On page load, they're populated via AJAX
$(document).ready(function() {
$('.panel').each(function(index, value) {
$.get('/panel', {'content': $(this).attr('data-request')}, function(data) {
$(this).find('.panel-contents').html(data);
});
});
});
The request is sent fine. The response is OK. But I can't seem to write it into .panel-contents. Am I missing something?