Passing a variable from created in function a to function b when function b is inside function a
<p>I have a function for the class .myclassA, inside this function I capture the id of the particular element chose and I put it inside a variable inputid. This function also brings another function for another class(.myclassB), which is inside the first function. Do you guys have any idea how I can pass the variable inputid from the first function to the function inside it?
Thanks for all your help</p>

<pre><code>$('.myclassA').click(function(){
  var inputid = $(this).attr('id');
  $('.myclassB').click(function(inputid){
      var thisid = $(this).attr('id');
      $(inputid).val(thisid);
  });
  //$('seqa').click();
});
//$('#empcriddi').focus();
</code></pre>
