Get element from parameter in function

Get element from parameter in function

Hi Everyone,

I have to be missing something pretty obvious, but I am out of ideas. I am trying to get the tr from a table (#q34). I am (attempting) to pass the table name as a parameter in to a function. I could be doing a number of things incorrectly as I am a complete noob.

here I am trying to pass the parameter #q34: 

  1. $('.pCardUsedReg input').on('change', function(){

Here I trying to use the parameter as if it was text:

  1. var checkPCardCheck = function(x){ 
          var totalRows = $(x+" tr").length-1;

I have tried several ways to format the parameter in function code to no avail. Thanks in advance!!