javascript - jQuery replace/remove attribute without id or tag -


i new jquery, , i'm having trouble doing thought should simple find , replace operation.

i want remove disabled attribute. searching jquery remove sample, using id or tag.

    <td><a href="xx.html" disabled onclick="preparexform(this,'xx')" class="btn">ok</a> </td> 

i try code not working.

$("body *").replacetext( /disabled|disable/gi, "enable" ); 

use selector on attribute , remove when found. way never idea try use regex/replace on html tags

$("a[disabled]").each(function() {   $(this).removeattr("disabled"); });  

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -