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

jQuery - Own plugin authoring

0 votes
9 views
added Jun 1 in jQuery by LC Marshal First Warrant Officer (9,130 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 based Knowledge Exchange Platform, where you can share your finding or solution with other members of community.
...