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')); }); 

test


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -