//comma plugin $.fn.digits = function(){ return this.each(function(){ $(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") ); }) } //comma for price on listing and area summary $('.price-listing, .count-sale').digits();