Special Characters within the counters (data-to)

Home Forums Porto – Responsive HTML5 Template Special Characters within the counters (data-to)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10004825
    streetmagician
    Participant

    Hello

    I purchased the Porto template and was hoping to use the counter where the numbers count from 0 – specific number, however when adding special characters within a specific number it breaks the counter (ex. 100,000). If adding in between the numbers is not possible, is there a way to, for example, add a % to the end of the number, $ to the beginning? I tried adding additional code, however each time it displays above or below.

    Here is the type of counter I am trying to use. Thank you!

    Counter Sample


    #10004837
    Support
    Keymaster

    Hello, OK, here’s what you can do:

    1) Open the file: js/theme.js and add that:

    if ($el.data('prepend')) {
    	$el.html($el.data('prepend') + $el.html());
    }

    2) In the HTML setit like this:

    <strong data-to="100" data-prepend="$">100</strong>

    Let me know if you have any questions.

    Thanks.


    #10004890
    streetmagician
    Participant

    That works. You guys are excellent!
    Thanks very much for your help


Viewing 3 posts - 1 through 3 (of 3 total)

This topic is marked as "RESOLVED" and can not rceive new replies.