خرید بک لینک

Vote count: 0

I basically have 2 drop down boxes setup via html5 select element. Selection on the first one determines what is displayed in the 2nd one. However, the issue is that they both have the same id and jquery only works with the first group of the select elements and not the second.

       <div class="link-teacher">
            <select id="link-teacher" name="link-teacher" onclick="choose()">
                <option selected value="base">----------------</option>
                <option value="male">Homme</option>
                <option value="female">Femme</option> 

            </select>
        </div> 


        <div class="content" id="div1" style="display:none;">
             <select id="teacher" name="teacher">
                <option selected disabled></option>
                <option value="Mohamed Adil">Mohamed Adil</option>
                <option value="Sherif Reda">Sherif Reda</option> 
                <option value="Mohamed Shahban">Mohamed Shahban</option> 
                <option value="Abdullah al Haiti">Abdullah al Haiti</option>
                <option value="Salah">Salah</option>
                <option value="Ahmed Nabil">Ahmed Nabil</option>  
                <option value="Abdul Tawab">Abdul Tawab</option>
                <option value="Mahmoud Mahmoud">Mahmoud Mahmoud</option>  
                <option value="Ahmed Ghanim">Ahmed Ghanim</option>
            </select> 
         </div> 

         <div class="content" id="div2" style="display:none;">
            <select id="teacher" name="teacher">
                <option selected disabled></option>
                <option value="Shirine">Shirine</option>
                <option value="Asma">Asma</option>
                <option value="Fatima">Fatima</option>
            </select>                     
        </div> 

And here is the jquery :-

       $("#teacher").on("change", function(){
          console.log($(this).val());
          $("#calendar").fullCalendar("refetchEvents");

        });

asked 27 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: جمعه 25 تير 1395 ساعت: 0:01

صفحه بندی