javascript - Trying to post a variable into a jquery click selector -


I am trying to insert a variable as a selector on a click event for a dynamic row in a table I am If I hardcode the class name, then the row click works fine, if I change it to a variable then it is not. I've put a warning inside the function to verify that the function is being given variable, and that's it.

  $ ("# testDiv") Endon ('& lt; tr class = "PathHideTest">     

Here's my job:

  $ j (document) .ready (function () {var pathName = 'test'; $ ('# testDiv '), Click on' Trapathy '+ path name, function (event {warning ("found row");});}); As mentioned above, if I have a hard code 'tr.PathHideTest' in the selector, this is not a problem. Any help would be appreciated.  

var pathName = 'test' with uppercase t :)

The code will be:

  $ (document) .ready (function () {var pathName = 'test'; $ ('# testDiv'). ('Click', 'Tr.phathheide' + pathName, function (event {alert ("found row");});});    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -