title: MDL- componentHandler.upgradeDom(); after ajax call
body: <p>I have following ajax setup using Google material design lite:</p>
  
  <p><strong>first.php</strong></p>
  
  <pre><code>&lt;button class="rhm_add_button" type="button" &gt;
      Show                      
  &lt;/button&gt;
  &lt;div class="rhm_add"&gt;&lt;/div&gt;
  
  
  &lt;script&gt;
  jQuery(document).ready(function() {
              jQuery('.rhm_add_button').click(function(e) {
                  e.preventDefault();
                  jQuery.ajax({
                      type: "GET",
                      url: "&lt;?php echo admin_url('admin-ajax.php'); ?&gt;", 
                      dataType: 'html',
                      data: ({ action: 'rhmp_indi_form'}),
                      success: function(data){
                              jQuery('.rhm_add').html(data);
                  },                  
                  error: function(data)  
                  {  
                  alert("Error!");
                  return false;
                  }  
                  }); 
           }); 
       }); 
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Functions.php</strong></p>
  
  <pre><code>function rhmp_indi_form_callback() {  
      $template_part_path = 'page-parts/second_page';
      get_template_part($template_part_path);
      exit;
  }
  add_action('wp_ajax_rhmp_indi_form', 'rhmp_indi_form_callback');
  add_action('wp_ajax_nopriv_rhmp_indi_form', 'rhmp_indi_form_callback');
  </code></pre>
  
  <p><strong>Second_file.php</strong></p>
  
  <pre><code> &lt;div class="mdl-textfield mdl-js-textfield"&gt;                                       
      &lt;input class="mdl-textfield__input" type="text" id="title" name="title"/&gt;
      &lt;label class="mdl-textfield__label" for="title"&gt;Name&lt;/label&gt;                                        
   &lt;/div&gt;
  </code></pre>
  
  <p>As you can see I am using the MDL and when the contents are loaded via ajax, they do not work properly and I found the following solution from the github: <a href="https://github.com/google/material-design-lite/issues/1043" rel="nofollow">https://github.com/google/material-design-lite/issues/1043</a></p>
  
  <p>The solution was that I need to use "componentHandler.upgradeDom();" after the ajax call and I am not sure how to do it.</p>
  
  <p>Does anyone have an idea how to implement this?</p>
  
  <p>Thanks!</p>