• Resolved pediaf

    (@pediaf)


    Hello, I would like to know if in the Odometer widget, there is a way to change the comma to the dot or how the comma could be eliminated. This, because in my country, the comma is not used to separate thousands and millions.

Viewing 1 replies (of 1 total)
  • Plugin Author livemesh

    (@livemesh)

    The odometer function is derived from this library – https://github.hubspot.com/odometer/.

    If you modify the file wp-content/plugins/livemesh-siteorigin-widgets/includes/widgets/lsow-odometers-widget/js/odometer.js to –

    jQuery(function ($) {
    
        window.odometerOptions = {
            format: '(.ddd)', // Change how digit groups are formatted, and how many digits are shown after the decimal point
        };
    
        $('.lsow-odometers').livemeshWaypoint(function (direction) {
    
            $(this.element).find('.lsow-odometer .lsow-number').each(function () {
    
                var odometer = $(this);
    
                setTimeout(function () {
                    var data_stop = odometer.attr('data-stop');
                    $(odometer).text(data_stop);
    
                }, 100);
    
            });
    
        }, { offset: (window.innerHeight || document.documentElement.clientHeight) - 100,
            triggerOnce: true});
    
    });

    it will modify the odometer according to your needs.

Viewing 1 replies (of 1 total)
  • The topic ‘Change comma to dot in odometer’ is closed to new replies.