Include placeholders in total calculation if value is empty
This commit is contained in:
@@ -39,6 +39,9 @@ jQuery(document).ready(function($){
|
|||||||
var sum = 0;
|
var sum = 0;
|
||||||
$(this).closest('.sp-stats-table').find('.sp-post').each(function() {
|
$(this).closest('.sp-stats-table').find('.sp-post').each(function() {
|
||||||
val = $(this).find('td').eq(index).find('input').val();
|
val = $(this).find('td').eq(index).find('input').val();
|
||||||
|
if(val == '') {
|
||||||
|
val = $(this).find('td').eq(index).find('input').attr('placeholder');
|
||||||
|
}
|
||||||
if($.isNumeric(val)) {
|
if($.isNumeric(val)) {
|
||||||
sum += parseInt(val, 10);
|
sum += parseInt(val, 10);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user