javascript - How to remove style of all Divs matching particular criteria? -


i having following html structure=>

<span style="font-size:13px;"> <div style="margin-top:14pt;margin-bottom:1em;"><br>  <font size="1"><span style="font-size:12px;"><b>name:</b></span></font><font size="1"><span style="font-size:12px;"> pratikjj jj</span></font></div> <div style="margin-top:14pt;margin-bottom:1em;"><font size="1"><span style="font-size:12px;"><b>email:</b> <a target="_blank" href="redir.aspx?c=aqq9qrs3s0ccur8wyx3quu0hmt-cf9ei3kjbziy3j26howkecgal2vvhktrt0q8mek1s8kdowtw.&amp;url=mailto%3apratik.joshi%40aressindia.net">pratik.joshi@aressindia.net</a></span></font></div> <div style="margin-top:14pt;margin-bottom:1em;"><font size="1"><span style="font-size:12px;"><b>phone number:</b></span></font><font size="1"><span style="font-size:12px;"> 919999999999</span></font></div> <div style="margin-top:14pt;margin-bottom:1em;"><font size="1"><span style="font-size:12px;"><b>name of facility:</b> sdsd</span></font></div> <div style="margin-top:14pt;margin-bottom:1em;"><font size="1"><span style="font-size:12px;">&nbsp;</span></font></div> </span> 

this want =>

if div containing following style

margin-top:14pt;margin-bottom:1em; 

then styling should blank or example style=""

try using attribute contains selector,

$('div[style*="margin-top:14pt;margin-bottom:1em;"]').removeattr("style"); 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -