WordPress.org

Ready to get started?Download WordPress

Forums

Shortcoder
Use with JavaScript (1 post)

  1. Amit Kvint
    Member
    Posted 1 year ago #

    Hi am trying to embed a JavaScript code with no success, below is the code -

    <link rel="stylesheet" type="text/css" href="counter.css" />
    <script type="text/javascript" src="counter.js"></script>

    <div><div id="customCounter" class="custom-counter"></div></div>

    <script type="text/javascript">

    var customCounter = null;
    var customTimerId = null;
    function loadCounter(){
    customCounter = new Counter("customCounter", {
    digitsNumber : 3,
    direction : Counter.ScrollDirection.Mixed,
    scrollAnimation : Counter.ScrollAnimation.SlotMachine,
    characterSet : Counter.DefaultCharacterSets.numericUp,
    charsImageUrl : "images/numeric_up_blackbg5.png",
    markerImageUrl : "marker.png",
    prefixText : '$',
    value : 0
    });

    customTimerId = window.setInterval(function(){
    if (parseFloat(customCounter.value) < 212){
    customCounter.add(13, 100);
    } else {
    clearInterval(customTimerId);
    }
    }, 150);
    }

    loadCounter();

    </script>

    http://wordpress.org/extend/plugins/shortcoder/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic