title: Plugin throwing TypeError after WordPress 4.5 update
body: <p>I'm debugging a visual composer plugin that broke after I updated WordPress to 4.5 and I can't figure out why it is throwing a TypeError.</p>
  
  <p>The error message in the console:</p>
  
  <pre><code>JQMIGRATE: Migrate is installed, version 1.4.0              load-scripts.php?....
  Uncaught TypeError:     $template.get is not a function     composer-view.js?ver=4.1.1.1:73
  </code></pre>
  
  <p>The only occurrences of <code>$template</code> are found in the code below. I understand that this isn't very much context to go off of but, how can I resolve this error?</p>
  
  <pre><code>/**
   * Convert html into correct element
   * @param html
   */
  html2element: function(html) {
    var attributes = {},
      $template;
    if (_.isString(html)) {
      this.template = _.template(html);
      $template = $(this.template(this.model.toJSON()).trim());
    } else {
      this.template = html;
      $template = html;
    }
    _.each($template.get(0).attributes, function(attr) { // **errors on this line**
      attributes[attr.name] = attr.value;
    });
    this.$el.attr(attributes).html($template.html());
    this.setContent();
    this.renderContent();
  },
  </code></pre>
  
  <p><br></p>
  
  <p>Update:</p>
  
  <p>It looks like this might be a problem with jQuery. WordPress 4.5 includes jQuery 1.12 which fixed a bug that allowed certain code to be run with incorrect syntax. I assume that the plugin code must have had incorrect syntax but ran nonetheless until now.</p>
  
  <p><a href="https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list#post-8271654" rel="nofollow noreferrer">https://wordpress.org/support/topic/read-this-first-wordpress-45-master-list#post-8271654</a></p>