Title: Separating higher numbers &#8211; solution
Last modified: April 18, 2020

---

# Separating higher numbers – solution

 *  Resolved [Jakub](https://wordpress.org/support/users/jakubgrac/)
 * (@jakubgrac)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/separating-higher-numbers-solution/)
 * Hi everyone, I did little improvements for my friends so can share if someone
   need it
 * – By default, numbers are shown as 12344568, 1234 etc, if you want numbers display
   as 1 234 567, 1 234 you can add this code:
 * 1, open /public/js/corona-virus-data-public.js
 * 2, add function on line 6
 *     ```
       $.fn.digits = function(){ 
       return this.each(function(){ 
       $(this).text( $(this).text().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1 ") ); 
       })
       }
       ```
   
 * 3, then add `.digits();` to every line with append
 * code hint: [https://pasteboard.co/J4lTBb6.png](https://pasteboard.co/J4lTBb6.png)
   
   result: [https://pasteboard.co/J4lUkuu.png](https://pasteboard.co/J4lUkuu.png)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Duke Yin](https://wordpress.org/support/users/freeduke/)
 * (@freeduke)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/separating-higher-numbers-solution/#post-12693099)
 * Thanks [@jakubgrac](https://wordpress.org/support/users/jakubgrac/) it looks 
   much better! Good job!
 *  Plugin Author [Duke Yin](https://wordpress.org/support/users/freeduke/)
 * (@freeduke)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/separating-higher-numbers-solution/#post-12695768)
 * Hi [@jakubgrac](https://wordpress.org/support/users/jakubgrac/) , I found a new
   way to format numbers, now numbers are separated by comma like 0,123,456.
 * Update the plugin to see the effects.
 * Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Separating higher numbers – solution’ is closed to new replies.

 * ![](https://ps.w.org/corona-virus-data/assets/icon-256x256.png?rev=2248214)
 * [Corona Virus Data](https://wordpress.org/plugins/corona-virus-data/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/corona-virus-data/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/corona-virus-data/)
 * [Active Topics](https://wordpress.org/support/plugin/corona-virus-data/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/corona-virus-data/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/corona-virus-data/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Duke Yin](https://wordpress.org/support/users/freeduke/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/separating-higher-numbers-solution/#post-12695768)
 * Status: resolved