title: Remove inline style using jquery plugin
body: <p>I tries to use <a href="https://stackoverflow.com/questions/2465158/is-it-possible-to-remove-inline-styles-with-jquery#answer-6553745">this function</a>:</p>
  
  <p>Here is the full html:</p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;
        &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
     &lt;/head&gt;
     &lt;body&gt;
       &lt;div id="test" style="width:auto;max-width:150px;"&gt;&lt;/div&gt;
       &lt;script&gt;
         (function($)
         {
             $.fn.removeStyle = function(style)
             {
                 var search = new RegExp(style + '[^;]+;?', 'g');
  
                 return this.each(function()
                 {
                     $(this).attr('style', function(i, style)
                     {
                         return style.replace(search, '');
                     });
                 });
             };
         }(jQuery));
         $(function(){
           $('#test').removeStyle('width');
         });
       &lt;/script&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But I have get this problem:</p>
  
  <pre><code>&lt;div id="test" style="max-"&gt;&lt;/div&gt;
  </code></pre>