Strip out inline style in jquery without using regular expression

Here is a simple code snippet to strip out inline style using jquery.

 function StripOutInlineStyles(html) {
            var dom = $('
' + html + '
'); dom.find('*').removeAttr('style'); return dom.html(); }
This can be viewed in this jsfiddle as well.
Facebook Facebook LinkedIn LinkedIn

Leave a Comment

For Gravatar icon