troubleshooting Question

jQuery need to change individual accordian h3 tag

Avatar of Charles Baldo
Charles BaldoFlag for United States of America asked on
jQueryCSSASP.NET
2 Comments1 Solution71 ViewsLast Modified:
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;
        }
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros