Operators not working?
<p>ok i did according to your suggestion but somewhat it looks amatuerish ha.. cos it repeats the same thing for each percentage group: css and message. I am wondering if there is another way to change it? If not, i am ok with this..</p>

<p>if (69 &lt; percentDiscount &amp;&amp; percentDiscount &lt; 101) {</p>

<pre><code>        $(this).find("#percentoff").html('&amp;gt; 70% off');
        $(this).find("#percentoff").addClass('badge70');
    }

    else if (49 &lt; percentDiscount &amp;&amp; percentDiscount &lt; 70) {

        $(this).find("#percentoff").html('&amp;gt; 50% off');
        $(this).find("#percentoff").addClass('badge50');
    }

    else if (29 &lt; percentDiscount &amp;&amp; percentDiscount &lt; 50) {

        $(this).find("#percentoff").html('&amp;gt; 30% off');
        $(this).find("#percentoff").addClass('badge30');
    }


    else if (19 &lt; percentDiscount &amp;&amp; percentDiscount &lt; 30) {

        $(this).find("#percentoff").html('&amp;gt; 20% off');
        $(this).find("#percentoff").addClass('badge30');
    }
</code></pre>
