Dynamically Change CSS with Javascript or jQuery
<p>I have a snippet of code in which I would like to change the css dynamically based on the values being greater than 0. For a value of '0' the class = 'cart-summary__count'. For a value greater than '0' class = 'cart-summary__count_full'.</p>

<pre><code>&lt;span class="cart-summary__count" data-v-observable="cart-count"&gt;0&lt;/span&gt;

&lt;span class="cart-summary__count" data-v-observable="cart-count"&gt;1&lt;/span&gt;
</code></pre>

<p>*edit:</p>

<pre><code>&lt;div id="cart-summary"&gt;
  &lt;span class="cart-summary__count" data-v-observable="cart-count"&gt;0&lt;/span&gt;
  &lt;a href class="cart"&gt;example.com&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>change to:</p>

<pre><code>&lt;a href class="cart-full"&gt;example.com&lt;/a&gt;
</code></pre>

<p>I am still learning Js and any help would be greatly appreciated. The cart value can change on the page when adding an item.</p>