Viewing 15 posts - 1 through 15 (of 18 total)
  • Posted in: Dante
  • #59188
    yarg375
    Member
    Post count: 3

    Hello,

    Is possible show decimal values in the counters as “4.8”?. Thank You!

    Regards,
    Yeik

    #59230
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit functions.js at /dante/js/

    Find this code 
    countNumber.countTo({
    
    Replace with 
    countNumber.countTo({decimals: 2,  

    Hopefully will work 100% .

    With Best Regards
    Swift Ideas

    #59579
    yarg375
    Member
    Post count: 3

    Hi,

    Works correctly! but also the change all integer values ​​to decimal, example 5 –> 5.00, Is possible to have integers and decimal values ​​in the same counter? Thank You!

    Regards,
    Yeik

    #59585
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    All integers will show decimal automatically . Now Please make changes in codes

    1-Find this code in functions.js
    countSubject = countAsset.find('.count-subject');
    
    Replace with 
    countSubject = countAsset.find('.count-subject');
    var mixed_var = countNumber.data('to');
    var mydec=(+mixed_var === mixed_var && (!isFinite(mixed_var) || !! (mixed_var % 1))) ? 2 : 0;
    
    2- Find this code 
    countNumber.countTo({decimals: 2, 
    
    Replace with Replace with 
    countNumber.countTo({decimals: mydec, 

    Thanks

    #59921
    yarg375
    Member
    Post count: 3

    Thank You! this works perfectly! =)

    #59938
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome
    Thanks 🙂
    With Best Regards
    Swift Ideas

    #65392
    boom
    Member
    Post count: 5

    Anyway to add commas to large numbers in counters? So if I have 500000 is there a way for it to display as 500,000? And even better is there a way to do both decimal points and commas? So in one counter I can have 500,000 but in another I can have 25.7?

    Thanks…

    #65398
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi there,

    Unfortunately that is not part of the current theme functionality, and it’s not within the scope of our support to be able to provide that functionality as it is more work than a small customisation. While we’d love to be able to support every customisation request, we simply don’t have the time. We recommend that you seek a freelance developer if you need that functionality, potentially from one of the below resources:

    https://codeable.io

    Home


    http://www.microlancer.com

    #174983
    bentraynham
    Member
    Post count: 39

    I got this to work, but it doesn’t seem to be working on my iPhone. I want the number to be 3.5, but it’s still rounding up to 4 on iPhone. You can see what I’m talking about if you go here and scroll down to the “Tour Details” section: http://atlantafoodwalks.com/.

    Like I said, it works fine on desktop. Any clue why it won’t work the same on smartphones? See attached screen shot.

    Thanks,

    Ben

    Attachments:
    You must be logged in to view attached files.
    #175141
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please clear the cache of iphone and let me know your feedback.
    Thanks
    Mohammad

    #175469
    bentraynham
    Member
    Post count: 39

    Yeah, I already did that, but no luck.

    #175764
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    There are two replace of this code while you made change it one place. Find again and replace.
    Thanks
    Mohammad

    #176152
    bentraynham
    Member
    Post count: 39

    Can you tell me where the 2nd instance is located (which line #)? I’m not finding it.

    #176224
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please check after 12 line of first instance. You will find it.
    Thanks
    Mohammad

    #176234
    bentraynham
    Member
    Post count: 39

    Can you please be more specific? I’m not finding it. Thank you.

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register