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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -