I want to load just my div not the whole page. Here Is my code.
My whole HTML div disappears when I load my div using jquery.
I'm using $(".boxtopm").load(location.href + " .boxtopm"); to reload my div.
function edit_revenue(val) {
var id = val;
var amount = $('#revenue_amount_' + id).val();
$.ajax({
type: 'post',
url: '{{route('edit_revenue')}}',
data: {
"_token": "{{ csrf_token() }}",
'id': id,
'amount': amount
},
success: function(data) {
$(".boxtopm").load(location.href + " .boxtopm");
$('.revnue_updated').removeClass('d-none');
$(".revnue_updated").fadeOut(3000);
}
});
};