Adding additional parameter to function

Adding additional parameter to function

I did not write the code below so I don't completely understand it but I want to pass an additional parameter from MyWebPage.aspx to the checkAvailability function. I'm calling the same function from different pages and I want to be to determine which page it came from

  1. checkAvailability.js


  2. (function($){
  3.     $.fn.checkAvailability = function(opts) {
  4.         opts = $.extend({
  5.             target: '#response',
  6. trigger: '#btnCheck', 
  7. ajaxSource: 'checkBorrowerNumber.aspx',
  8. fireOnKeypress: true
  9.         }, opts || {});
  10. };

  11. MyWebPage.aspx

  12. <script type="text/javascript">
  13.          $(document).ready(function () {                

  14. $("#MainContent_txtBorrowerNumber").checkAvailability();
  15. });
  16. </script>

  17. <asp:TextBox ID="txtBorrowerNumber" runat="server" CssClass="inputBox" TabIndex="4" /> <input id="btnCheck" type="button" value="Check Borrower ID" class="btn btn-sm btn-primary" /><span id="response" class="alert-danger"><!-- Our message will be echoed out here --></span>