Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

uncheck all other checkboxes when one is checked

private void all_CheckedChanged(object sender, EventArgs e)
{

    if (!m_all.Focused)
     return ;

    if (m_all.Checked)
    {
        foreach (CheckBox cb in m_attributes)
        {
            cb.Checked = true;
        }
    }
    else
    {
        foreach (CheckBox cb in m_attributes)
        {
            cb.Checked = false;
        }
    }
}
Comment

uncheck all other checkboxes when one is checked

$(document).ready(function () {
  $('input[type="checkbox"]').click(function () {
    if ($(this).prop("checked") == true) {
      $('input[type="checkbox"]').not(this).prop('checked', false);
    }
  });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: delete all items in an array 
Javascript :: react onwheel preventDefault 
Javascript :: jsdoc run for all files in folder 
Javascript :: function solution(n) { } 
Javascript :: autonumeric stimulus 
Javascript :: filter by last month 
Javascript :: Pointing Subdomain To A Next.js Page On Vercel 
Javascript :: check if content is overflowing react 
Javascript :: javascript Check the answer 
Javascript :: { "typeof": false } 
Javascript :: Call Injected AngularJs Service In Controller From Blazor Within CustomElement/WebComponent 
Javascript :: angularjs How to pass option value and label created with ng-repeat triggered by ng-change 
Javascript :: Getting PointerEvent instead of jQuery.Event on ng-click in AngularJS 
Javascript :: angularjs Ionic styling container 
Javascript :: AngularJS slick carousel filter by attribute 
Javascript :: How do I change this React Navigation v5 code to v6 
Javascript :: What is the best way to download mulitple images using jquery 
Javascript :: debugJSON 
Javascript :: node-mongodb-native keep collection 
Javascript :: make field un updatable mongoose 
Javascript :: cleave js 
Javascript :: jquery search button 
Javascript :: phaser move towards object 
Javascript :: for in loop of javascript 
Javascript :: difference between push and pop in javascript 
Javascript :: javascript for website design center text 
Javascript :: give call suggestions while clicking on a contact number in next js 
Javascript :: Moving Zeros To The End 
Javascript :: check token balance of an address in js 
Javascript :: Backbone View El 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =