Title: Use with JavaScript
Last modified: August 21, 2016

---

# Use with JavaScript

 *  [Amit Kvint](https://wordpress.org/support/users/webifish/)
 * (@webifish)
 * [13 years ago](https://wordpress.org/support/topic/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/](http://wordpress.org/extend/plugins/shortcoder/)

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

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Amit Kvint](https://wordpress.org/support/users/webifish/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/use-with-javascript/)
 * Status: not resolved