title: Is it possible give an href="mailto:" the value of a data-bind: text?
body: <p><strong>I am trying to give the value of an data-bind: text function to the href=&quot;mailto:&quot; but can't seem to get it right.</strong></p>
  <p><em>My Code so far:</em></p>
  <p>HTML:</p>
  <pre><code>&lt;a href=&quot;#&quot; class=&quot;mailCloseBranch&quot; data-bind=&quot;text: closestBranch().email&quot;&gt;someEmailFromDataBind.com
  &lt;/a&gt;
  </code></pre>
  <p>Replacing Value of href:</p>
  <pre><code>$(&quot;a.mailCloseBranch[href$='#']&quot;).each(function() {
    var ref = document.getElementsByClassName('mailCloseBranch')[0].value;
    var mailref = 'mailto:' + String(ref);
  
    this.href = this.href.replace(&quot;#&quot;, mailref);
  });
  </code></pre>
  <p>The 'mailto:' string from <strong>var mailref</strong> gets insertet and the correct email is displayed in the</p>
  <p><code>&lt;a&gt;</code> element</p>
  <p>but the value of <strong>var ref</strong> stays undefined which in turn leads to no link to &quot;mailto&quot;.</p>