$(function() {
    $('#team_attendances_attributes_0_conference_id').on("change", function() {
      $("select option").attr("disabled",false);
      DisableOptions();
      //let contentSelected = $('#team_attendances_attributes_0_conference_id option:selected').val();
      //$("#team_attendances_attributes_1_conference_id")[contentSelected].remove();
    });


        function DisableOptions(){
          debugger;

          $("select option").filter(function()
              {
                    var bSuccess=false; //will be our flag to know it coincides with selected value
                    var selectedEl=$(this);
                    $("select option:selected").each(function()
                    {

                        if($(this).val()==selectedEl.val())
                        {
                             bSuccess=true; //it coincides we will return true;
                             return false; // this serves to break the each loop
                         }

                    });
                    return bSuccess;
         }).css("display","none");

    };

});

@@ -8,18 +8,16 @@
 ion() %7B%0A
-  
   $('#te
@@ -167,210 +167,15 @@
     
-  //let contentSelected = $('#team_attendances_attributes_0_conference_id option:selected').val();%0A      //$(%22#team_attendances_attributes_1_conference_id%22)%5BcontentSelected%5D.remove();%0A    %7D);%0A%0A%0A     
+%7D);%0A%0A
   
- 
 func
@@ -201,35 +201,8 @@
 ()%7B%0A
-          debugger;%0A%0A      
     
@@ -241,139 +241,36 @@
 on()
-%0A              %7B%0A                    var bSuccess=false; //will be our flag to know it coincides with selected value%0A              
+%7B%0A      var bSuccess=false;%0A
     
@@ -295,30 +295,16 @@
 (this);%0A
-              
       $(
@@ -348,48 +348,10 @@
 on()
+%7B
 %0A
-                    %7B%0A%0A                
     
@@ -393,238 +393,69 @@
 l())
-%0A                        %7B%0A                             bSuccess=true; //it coincides we will return true;%0A                             return false; // this serves to break the each loop%0A                         %7D%0A%0A              
+%7B%0A          bSuccess=true;%0A          return false;%0A        %7D%0A
     
@@ -460,28 +460,16 @@
     %7D);%0A
-            
         
@@ -485,19 +485,16 @@
 uccess;%0A
-   
       %7D)
@@ -521,17 +521,15 @@
 %22);%0A
-%0A
     %7D;%0A
-%0A
 %7D);%0A

fix js function to disable selected option for conference