How to convert simple jQuery code to wordpress jQuery of the following code : <pre><code>    &lt;b id="smsCount"&gt;&lt;/b&gt; SMS (&lt;b id="smsLength"&gt;&lt;/b&gt;) Characters left
    &lt;br /&gt;&lt;textarea id="smsText" style="width:400px;height:200px"&gt;
    &lt;/textarea&gt;


    //Plugin
    (function($){
      jQuery.fn.smsArea = function(options){

var
e = this,
cutStrLength = 0,

s = jQuery.extend({

    cut: true,
    maxSmsNum: 3,
    interval: 400,

    counters: {
        message: jQuery('#smsCount'),
        character: jQuery('#smsLength')
    },

    lengths: {
        ascii: [160, 306, 459],
        unicode: [70, 134, 201]
    }
    }, options);


e.keyup(function(){

    clearTimeout(this.timeout);
    this.timeout = setTimeout(function(){

        var
        smsType,
        smsLength = 0,
        smsCount = -1,
        charsLeft = 0,
        text = e.val(),
        isUnicode = false;

        for(var charPos = 0; charPos &lt; text.length; charPos++){
            switch(text[charPos]){
                case "\n": 
                case "[":
                case "]":
                case "\\":
                case "^":
                case "{":
                case "}":
                case "|":
                case "€":
                    smsLength += 2;
                break;

                default:
                    smsLength += 1;
            }

            //!isUnicode &amp;&amp; text.charCodeAt(charPos) &gt; 127 &amp;&amp; text[charPos] != "€" &amp;&amp; (isUnicode = true)
            if(text.charCodeAt(charPos) &gt; 127 &amp;&amp; text[charPos] != "€")
            isUnicode = true;
        }

        if(isUnicode)   smsType = s.lengths.unicode;
        else                smsType = s.lengths.ascii;

        for(var sCount = 0; sCount &lt; s.maxSmsNum; sCount++){

            cutStrLength = smsType[sCount];
            if(smsLength &lt;= smsType[sCount]){

                smsCount = sCount + 1;
                charsLeft = smsType[sCount] - smsLength;
                break
            }
        }

        if(s.cut) e.val(text.substring(0, cutStrLength));
        smsCount == -1 &amp;&amp; (smsCount = s.maxSmsNum, charsLeft = 0);

        s.counters.message.html(smsCount);
        s.counters.character.html(charsLeft);

    }, s.interval)
}).keyup()
    }}(jQuery));


    //Start
    jQuery(function(){
     jQuery('#smsText').smsArea({maxSmsNum:3});
    });
</code></pre>

<p>I am working in Wordpress, M going to make some smscount system that counts  ASCII and Unicode character.I saw somewhere that Wordpress take jQuery instead of $. But it is not working. Dnt knw whr I make mistake?</p>

<p>Any help is appreciated. </p>
