title: React to blur event in knockout.js
body: <p>I have an input textbox and whenever it loses focus I want to get its value text in a function.</p>
  
  <p>For example, if type <code>"testimonials1"</code>, how could I get that text in an event handler for the <code>blur</code> event?</p>
  
  <p>This is what I tried. I get <code>ProjectTestimonial</code> as an object, not user-typed text.</p>
  
  <p>HMTL   </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="ratingcontents" data-bind="foreach: ProjectTestimonial"&gt;
    &lt;!--ko if: !Testimonialstext--&gt;
    &lt;input type="text" placeholder="Testimonials" class="txttestimonials" 
      data-bind="
        text: Testimonialstext,
        event: { 
          blur: $root.testimonialblurFunction.bind(SourceId, SourceText, Testimonialstext)
        }
      " 
    &gt;
    &lt;!--/ko--&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>self.testimonialblurFunction = function (data, event, Testimonialstext) {
      debugger;
      alert(data.soid + Testimonialstext);
  }
  </code></pre>