title: How to apply condition on jquery blur event listener
body: <p>How to check if user tab on this input then variable a = student_id and if user tab on this input then variable a = book_id. is this possible. For example:-</p>
  
  <p>Is this possible that if user tab on book id input field then alert book or if user tab on student_id field then it alert student id</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(document).ready(function() {
    if ($("#stu_id").blur()) {
      var id = $("#stu_id").val();
    } else if ($("#book_id).blur()){
      var id = $("#book_id").val();
    }
    $(id).blur(function() {
      // ajax code
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input type="text" name="stu_id" id="stu_id"&gt;
  &lt;input type="text" name="stu_name" id="stu_name"&gt;
  &lt;input type="text" name="book_id" id="book_id"&gt;
  &lt;input type="text" name="book_name" id="book_name"&gt;</code></pre>
  </div>
  </div>
  </p>