Loading...

BigCommerce Templates : How to change the color of a menu page

Daniel C. Published on 14 October, 2011

There is no option in your BigCommerce template that will allow you to change the color of a menu page. This article will show you how to do that. Just copy-paste the below generated code in the footer.html template file, after you choose the page name and the color code.

Page Name: Color Code: OK

<script>
$(document).ready(function() {

<span class="nx">$</span><span class="p">(</span><span class="s1">&#39;#Menu ul li a&#39;</span><span class="p">).</span><span class="nx">each</span><span class="p">(</span><span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
    <span class="k">if</span><span class="p">(</span><span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">find</span><span class="p">(</span><span class="s1">&#39;span&#39;</span><span class="p">).</span><span class="nx">text</span><span class="p">()</span> <span class="o">==</span> <span class="s2">&quot;PageName&quot;</span><span class="p">)</span> <span class="p">{</span>

        <span class="nx">$</span><span class="p">(</span><span class="k">this</span><span class="p">).</span><span class="nx">css</span><span class="p">(</span><span class="s1">&#39;background-color&#39;</span><span class="p">,</span> <span class="s1" id="clc">&#39;ColorCode&#39;</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">});</span>

}); </script>



Test it yourself!
Enter the page name you want to change the background color for, and the color code:

Page Name: Color Code: OK



Let me know if you run into any problems or need help with getting this to work for your template.

Daniel C. Published on 14 October, 2011