function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ratu kucingratu kucing 

is it possible to disable other checkboxes in setimeout if specific checkbox checked in apex-repeat?

i have a program that can update multiple value, i wanted to give settimeout 2 second after click on spesific checkbox. when settimeout is loading the other checkbox in apex-repeat is disabled and when the settimeout is over the other checkbox will be enable again.
i tried so many ways and still not figure it out.
is it possible?
 
this is my code now:
<apex:repeat value="{!dataSalesPlan}" var="i">
<apex:inputCheckbox styleClass="checkOpex{!i.spd.ID} checkOpex {!i.spd.ID}" value="
{!i.opex}">
   <apex:actionSupport event="onchange" action="{!updateOpex}" reRender=""> 
   <apex:param name="salesPlanIndex" value="{!i.index}" assignTo="{!salesPlanIndex}"/>
   </apex:actionSupport>
</apex:inputCheckbox>
</apex:repeat>

Javascipt
<script type="text/javascript">
    document.documentElement.style.setProperty('--screen-width', (screen.width - 120)+'px');
    j$ = jQuery.noConflict();
    
    j$(document).ready(function() {
        j$(document).on('change', '.checkOpex', function(e) {
            var self = $(this);
            $(this).prop('disabled', true);
            setTimeout(function() {
            $(self).removeAttr('disabled');
            alert("Succesfully Set Data");
            }, 2000);
        });
    });