title: Change css of active accordion and parent tab in jquery-ui
body: <p>I am kinda new to jquery so have confusion regarding how to select the parent tab or just add effect on the current accordion. Whatever code I write within the script in the php condition is not making any visible change in the css of .ui-widget-header, most likely because I'm not selecting the parent element itself.</p>
  
  <p>Let me give the necessary snippet of my code</p>
  
  <pre><code>&lt;div id="tabs"&gt;
  &lt;ul&gt;
      &lt;li&gt;&lt;a href="#tabs-1"&gt;Tab 1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#tabs-2"&gt;Tab 2&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#tabs-3"&gt;Tab 3&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;div id="tabs-1"&gt;
      &lt;div id="accordion"&gt;
  
         &lt;div&gt; Some content &lt;/div&gt;
         &lt;div&gt; 
             &lt;?php  
             //Perform some query
             if (mysqli_num_rows($query)==0)
             //Make background of current accordion, and parent tab red. Add jquery script here
             echo "&lt;script type='text/javascript'&gt; &lt;/script&gt;";//No clue what should be within this script, hence blank...
  //Probably something like  $("accordion").parent("#tabs").css( background-color: red;background-image: none;)
  //OR $(this).parents('div#tabs').css( background-color: red;background-image: none;)
             ?&gt; 
         &lt;/div&gt;
         &lt;div&gt;
            2nd accordion. There should be no effect here. 
         &lt;/div&gt;
     &lt;/div&gt;
     .....
  </code></pre>
  
  <p>A modfiied snipped is available on - jsfiddle.net/buKLE/8 ...Currently just tabs, and accordion. If possible, try and change the css of just tab1, supposing there is an error in accordion Section 2.
  Is it going to be even possible to change the color of just that accordion, since all the accordions are bound together here...  </p>