Below is the code I am working with, my goal is whenever the user clicks the button with a class name '.view_all'. I want to use the data
that is returned using ajax and put it inside this line $(this).parent('div').siblings('.body_wrap').html(data);
I have tried the code below but it is not working.
$('.view_all').click(function (event) {
$.ajax({
type: 'POST',
url: 'ajax/return_data.php'
}).success(function (data) {
$(this).parent('div').siblings('.body_wrap').html(data);
});
});