title: jQuery call function on input change by event
body: <p>I've got a page which loads an external js and on the page I've got a function <code>called calculate_totals()</code>. What I want is to call the function <code>calculate_totals()</code> from a function in the external js.</p>
  <p>This is a piece of JavaScript which loads in an external js</p>
  <pre class="lang-js prettyprint-override"><code>function selectItemMouse(thisVar)
  {   
      var searchValue = thisVar.attr('data-name');
      thisVar.parent().parent().parent().parent().children('.list').val(searchValue);
      
      
      //alert(thisVar.parent().parent().parent().parent().next().find('input').focus());
      
      thisVar.children().children().each(function()
      {
          var dataId = $(this).attr('data-id');
          var value = $(this).attr('data-name');
          
          //This change the input of my form
          $(thisVar).parent().parent().parent().parent().children().children('.'+dataId).val(value);
      });
      
      $('.customerResults').hide();
      calculate_totals();     
  }
  </code></pre>