10 examples of 'how to remove disabled attribute in jquery' in JavaScript

Every line of 'how to remove disabled attribute in jquery' 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
170function formDisabled(v){
171 loginDisabled(v)
172 loginUsername.disabled = v
173 loginPassword.disabled = v
174 if(v){
175 checkmarkContainer.setAttribute('disabled', v)
176 } else {
177 checkmarkContainer.removeAttribute('disabled')
178 }
179 loginRememberOption.disabled = v
180}
173function classUpdateDisabled($tag, $el, options) {
174 classUpdate($tag, options.disabledClass, $el.is(":disabled"));
175}
30function shouldBeDisabled(elements) {
31 for (let element of elements) {
32 expect(hasClass(element, "disabled"));
33 }
34}
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}
16function removeAttr(name) {
17 return this.each(function () {
18 this.nodeType === 1 && name.split(' ').forEach(function (attribute) {
19 setAttribute(this, attribute)
20 }, this)
21 })
22}
108function removeClassName( elem, name ) {
109 elem.className = elem.className.replace(name, "");
110}
10function disable($element) {
11 $element.prop("disabled", "disabled");
12}
94function disable () {
95 $('textarea').addClass ( 'disabled' ).attr ( 'disabled', 'disabled' );
96}
6function syncDisabledAttribute(command) {
7 let enabled = registry[command].enabled;
8 let nodes = Array.from(document.querySelectorAll(`[data-command='${command}']`));
9
10 nodes.forEach(n => n.disabled = !enabled);
11}
24function removeAttribute(doc, attr){
25 arrayFrom(doc.querySelectorAll('[' + attr +']'))
26 .forEach(function(el){
27 el.removeAttribute(attr);
28 })
29}

Related snippets