// var
var getProjname = $('.project-detail ul li:first-child .i-list-data').text(),
outlookPLislnk = 'https://alice.edgeprop.my/property/v1/nsearch?&keyword=',
fullPLislink = outlookPLislnk + getProjname;
//declare global variable, outside function
var pslList;
$.getJSON(fullPLislink, function(projectCountSale) {
var property_data = '';
$.each(projectCountSale.property, function(index, row) {
});
pslList = projectCountSale.found;
$('input#count-sale').val(pslList).digits();
$('.count-sale').fadeIn(300);
});
//all properties summary
var propSale = parseInt(porList),
propRent = parseInt(pslList),
allProp = (propSale) + (propRent);
// alert(propSale+propRent);
$('input#count-project').val(allProp);
$('.count-project').fadeIn(300);