title: Parametrize on() function jquery
body: <p>I have different user inputs. When one of them is changed I want to capture a change event only to its value.
  I'm trying to customize the code of an existing product. My goal is to pop up an error div when user input is wrong but my current code adds the error div under all inputs.
  This code works on all inputs but I want that it works only on input has title of label parent that contains 'Valore'.</p>
  <p>JS CODE:</p>
  <pre><code>$(document).on('focusin', 'input', function () {
     $(this).data(&quot;oldvalue&quot;, this.value);
  });
  $(document).on('change', 'input', function () {
     var $formGroup = $(this).closest('.binf-form-group');
     if ($.isNumeric(this.value)) {
         $formGroup.find('.binf-help-block').remove();
     } else {
         this.value = $(this).data(&quot;oldvalue&quot;);
         $('&lt;div class=&quot;binf-help-block&quot; role=&quot;alert&quot; style=&quot;white-space: normal;margin-top: 8px;background: #fff;color: #df3324;font-size: 11px;line-height: 16px;border-radius: 2px;border-left: 2px solid #df3324;padding: 0 8px;box-shadow: 0 0 4px 0 rgba(0,0,0,.3);&quot;&gt;This value must be a number.&lt;/div&gt;').appendTo($formGroup).fadeOut(3000, function () { $(this).remove()});
     }
  });
  </code></pre>
  <p>HTML:</p>
  <pre><code>&lt;div class=&quot;csui-field-text alpaca-container-item&quot; data-alpaca-container-item-index=&quot;6&quot; data-alpaca-container-item-name=&quot;4333_35&quot; data-alpaca-container-item-parent-field-id=&quot;alpaca44&quot;&gt;
      &lt;div class=&quot;binf-form-group alpaca-field alpaca-field-text alpaca-required binf-has-error alpaca-invalid&quot; data-alpaca-field-id=&quot;alpaca58&quot;&gt;
          &lt;label class=&quot;binf-control-label alpaca-control-label binf-col-sm-3&quot; for=&quot;alpaca58&quot; id=&quot;alpaca58Label&quot; title=&quot;Valore&quot;&gt;
             &lt;span class=&quot;alpaca-icon-required binf-glyphicon binf-glyphicon-star&quot;&gt;&lt;/span&gt;
             Valore
          &lt;/label&gt;
         &lt;div class=&quot;binf-col-sm-9&quot;&gt;
             &lt;div class=&quot;alpaca-control&quot;&gt;
                 &lt;div id=&quot;alpaca583195&quot; class=&quot;cs-formfield cs-textfield cs-formfield-invalid&quot;&gt;
                     &lt;div class=&quot;cs-field-write&quot;&gt;
                         &lt;div class=&quot;cs-field-write-inner&quot;&gt;
                             &lt;input type=&quot;text&quot; id=&quot;alpaca58&quot; maxlength=&quot;32&quot; placeholder=&quot;Add text&quot; value=&quot;&quot; aria-labelledby=&quot;alpaca58Label&quot; aria-required=&quot;true&quot; tabindex=&quot;-1&quot;&gt;
                         &lt;/div&gt;
                     &lt;/div&gt;
                 &lt;/div&gt;
             &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Thanks for your help!</p>