not able to select first child with jquery
I don't understand what am I doing wrong. I have the following html element:

    <div id="accordion">
        <h3>
            <a href="#">Section 1</a></h3>
        <div>
            <p>
                Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque.
                Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a
                nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada.
                Vestibulum a velit eu ante scelerisque vulputate.
            </p>
        </div>
        <h3>
            <a href="#">Section 2</a></h3>
        <div>
            <p>
                Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus
                hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum
                tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.
            </p>
        </div>                                    
    </div>


this element (`<div id='accordion'>`) clearly shows that it's first child is the h3 tag the next child is the div tag then the h3 etc


I want to select the fist child of this div. In other words I want to select the first h3 tag

as a result I have tried:


        $("#accordion:first-child").css("font-size","30px");
also

         $("#accordion:first").css("font-size","30px");

both ways applies a font of 30px to the main div element (`<div id='accordion'>`)  

what am I doing wrong I want to only select the first child of the accordion it clearly is the h3 tag


not able to select first child with jquery
===

I don't understand what am I doing wrong. I have the following html element:

    <div id="accordion">
        <h3>
            <a href="#">Section 1</a></h3>
        <div>
            <p>
                Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque.
                Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a
                nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada.
                Vestibulum a velit eu ante scelerisque vulputate.
            </p>
        </div>
        <h3>
            <a href="#">Section 2</a></h3>
        <div>
            <p>
                Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus
                hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum
                tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.
            </p>
        </div>                                    
    </div>


this element (`<div id='accordion'>`) clearly shows that it's first child is the h3 tag the next child is the div tag then the h3 etc


I want to select the fist child of this div. In other words I want to select the first h3 tag

as a result I have tried:


        $("#accordion:first-child").css("font-size","30px");
also

         $("#accordion:first").css("font-size","30px");

both ways applies a font of 30px to the main div element (`<div id='accordion'>`)  

what am I doing wrong I want to only select the first child of the accordion it clearly is the h3 tag

