Avatar of Charles Baldo
Charles Baldo
Flag for United States of America asked on

jQuery need to change individual accordian h3 tag

I have a jQuery accordian widget that I need to  change the background color of the h3 depending on a  .change event
using asp.net and  jQuery. Everything below works except the specific  color change of the h3 tag

 
    
  
   /*  asp.net */

           <div id="accordion">
                <h3 id="h3Accordianid">Header  h3 text</h3>
                   <div class="inputblock200px">
                        <asp:DropDownList ID="ddList" runat="server" />                
                    </div>
                ...
                ...
           </div>
               
/*  jQuery */

        $(document).ready(function () {
            $('#ddList').change(function () {
                 alert('This definitely fires');
                 $('#accordion .ui-accordion-header h3Accordianid').addClass('navyblue');
            });
        });


/* css */

        #accordion .ui-accordion-header {
            background: #703800; 
            color: white;
        }

        .navyblue {
              background-color:navy;
              color:white;
        }

Open in new window

jQueryCSSASP.NET

Avatar of undefined
Last Comment
Charles Baldo

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
hielo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Charles Baldo

ASKER
Sweet worked perfect thanks a ton
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck