Support » Plugin: Shortcoder » Use with JavaScript

  • 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/

  • The topic ‘Use with JavaScript’ is closed to new replies.