• Resolved Ivijan-Stefan Stipic

    (@ivijanstefan)


    Hi, I have a wierd issue with the plugin.

    front.js?ver=4.9.5:1072 Uncaught ReferenceError: number_format is not defined
        at HTMLBodyElement.<anonymous> (front.js?ver=4.9.5:1072)
        at HTMLBodyElement.dispatch (jquery.js?ver=1.12.4:3)
        at HTMLBodyElement.r.handle (jquery.js?ver=1.12.4:3)
        at Object.trigger (jquery.js?ver=1.12.4:3)
        at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)
        at HTMLBodyElement.<anonymous> (jquery.js?ver=1.12.4:3)
        at Function.each (jquery.js?ver=1.12.4:2)
        at a.fn.init.each (jquery.js?ver=1.12.4:2)
        at a.fn.init.trigger (jquery.js?ver=1.12.4:3)
        at HTMLDivElement.create (front.js?ver=4.9.5:1142)

    Generaly, when I search something with filter and want to search again I get this error. Can you look at this and push some update?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ivijan-Stefan Stipic

    (@ivijanstefan)

    Just made fix for your plugin. Use this code and you will be happy. ??

    function number_format (number, decimals, dec_point, thousands_sep) {
        // Strip all characters but numerical ones.
        number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
        var n = !isFinite(+number) ? 0 : +number,
            prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
            sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,
            dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
            s = '',
            toFixedFix = function (n, prec) {
                var k = Math.pow(10, prec);
                return '' + Math.round(n * k) / k;
            };
        // Fix for IE parseFloat(0.55).toFixed(0) = 0;
        s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
        if (s[0].length > 3) {
            s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
        }
        if ((s[1] || '').length < prec) {
            s[1] = s[1] || '';
            s[1] += new Array(prec - s[1].length + 1).join('0');
        }
        return s.join(dec);
    }

    Just add in front.js on the line 4 or integrate how you want and will work like a charm.

    I can’t wait your update, my deadline is close. Cheers!

    Hello

    Thank you for cooperation!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘number_format is not defined in jQuery’ is closed to new replies.