What am I missing here? My jquery function isn't firing. Here's the HTML:
<div id="sum_income" class="col-sm-3" onload="sumIncome();">
</div>
and here's the jquery function:
function sumIncome() {
var cur_month = $('#month option:selected').attr("value");
$.ajax({
type: "POST",
url: 'inc/functions.php',
data: {action: "get_sum_income", cur_month:cur_month},
success: function(response){
$('#sum_income').html(response);
setTimeout(sumIncome, 5000);
}
})
};