Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - Own plugin authoring

0 votes
11 views
added Jun 1 in jQuery by LC Marshal Lieutenant (12,650 points)
//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();

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...