Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
How to JQuery selector with parent element

The element ".transferaction" is a dynamically added row to a table. So, at the time of setting up this click event, I don't know the parent element. Is there a way to use a jquery selector can refer to the parent element? Code: $(".transferaction").parent() doesn't work

    $(".transferaction").parent().on("click", ".transferaction", function (event)
    {
        top.copyRow(this, null, ['odd', 'even']);
    });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Do you use ".transferaction" for the event?

If so you can do this:

$(document).on("click", ".transferaction", function(e){
   var $this = $(this);
   var parent = $this.parent();

   // Do something with parent
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!