10 examples of 'jquery toggle disabled' in JavaScript

Every line of 'jquery toggle disabled' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
377function toggleDisabled(ele){
378 ele = $(ele);
379 if(ele == null) {return;}
380 ele.disabled = !ele.disabled ;
381}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

174function toggleDisabled(){
175 disabled=!disabled;
176 forEachButton(function(widget){ widget._setDisabled(disabled); });
177 dojo.byId("toggle").innerHTML= disabled ? "Enable all" : "Disable all";
178}
13export function toggleBtnDisable(domSelector, disableStatus) {
14 // if disableStatus is false, enable.
15 // if disableStatus is true, disable.
16 $(domSelector).prop('disabled', disableStatus);
17}
85setDisabled(disabled) {
86 this.disabled = disabled;
87 this.$element.toggleClass(disabledClass, disabled);
88}
117set disabled(disabled)
118{
119 this._element.classList.toggle("disabled", disabled);
120}
270function toggle (bool) {
271 return bool ? false : true;
272}
439function toggleDisableForm(disabled)
440{
441 $('options_1').disabled = disabled;
442 $('options_2').disabled = disabled;
443 $('to').disabled = disabled;
444 $('cc').disabled = disabled;
445 $('bcc').disabled = disabled;
446 $('groups').disabled = disabled;
447 $('users').disabled = disabled;
448 $('subject').disabled = disabled;
449 $('message').disabled = disabled;
450 $('btn_send').disabled = disabled;
451 $('btn_preview').disabled = disabled;
452 $('btn_new').disabled = disabled;
453}
69function toggle(state) {
70 active = state;
71 menueBtn.toggleClass("active", active);
72 mainNav.toggleClass("active", active);
73}
92function toggleDisabled(from) {
93 for (name in widgets) {
94 var scope = widgets[name];
95 for (name in scope) {
96 var widget = scope[name];
97 if (from == widget) {
98 for (index in scope) {
99 widget = scope[index];
100 if (from != widget) {
101 if (from.checked) {
102 if (widget.hasAttribute('disabled')) {
103 widget.removeAttribute('disabled');
104 }
105 } else {
106 widget.setAttribute('disabled', true);
107 }
108 }
109 }
110 return true;
111 }
112 }
113 }
114 return false;
115}
190function setDisabled(state) {
191 let input = document.querySelector("#message")
192 let button = document.querySelector("#commitbutton")
193 input.disabled = button.disabled = trackPlugin.getState(state).uncommittedSteps.length == 0
194}

Related snippets