title: dynamic menu background color change with jquery
body: <p>i have menu.php.i want to include all of other file.so i have error to change menu background color&amp; font color on click event. pls check my code give me solution.thanks.</p>
  
  <p>in css file
       .add{background-color:#000; color:#fff;}</p>
  
  <p>in js file</p>
  
  <pre><code>&lt;script type="javascript"&gt;
  
      $(".clickme").click(function(){
      $(this).css('background-color':'#000','color':'#fff');
      $(li:first-child).removeClass('add');
   }); 
  
  &lt;/script&gt;
  </code></pre>
  
  <p>in html file  </p>
  
  <pre><code>&lt;ul&gt;
  
  
   &lt;li class="clickme add"&gt;&lt;a herf=""&gt;Home&lt;/a&gt;&lt;/li&gt;
   &lt;li class="clickme"&gt;&lt;a herf=""&gt;Services&lt;/a&gt;&lt;/li&gt;
   &lt;li class="clickme"&gt;&lt;a herf=""&gt;Porfile&lt;/a&gt;&lt;/li&gt;
   &lt;li class="clickme"&gt;&lt;a herf=""&gt;About Us&lt;/a&gt;&lt;/li&gt;
   &lt;li class="clickme"&gt;&lt;a herf=""&gt;Contact Us&lt;/a&gt;&lt;/li&gt;
  
  
  
  &lt;/ul&gt;
  
  enter code here
  </code></pre>