html - How to remove sub attribute of style -
how remove sub attribute of style. want remove display:none; attribute of style below code.
<div class="ui-state-default ui-jqgrid-hdiv" style="width: 1085px; display: none; visibility: visible; "> 
the following can remove display subattribute of element's style attribute in javascript+jquery:
$('div.ui-state-default.ui-jqgrid-hdiv').each(function () {     var st = this.getattribute('style').split(';').map(function (a) {         return a.tolowercase().indexof('display')>-1 ? '':a;     }).join(';');     this.setattribute('style', st);     // alert('test: display property == '+ $(this).css('display')     // + ', style attribute == ' + $(this).attr('style')); }); 
Comments
Post a Comment