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

172
Views
How change prop('checked', true) until different element (for example tr) JQUERY/JS

How after double click checkbox for example 100 change state on check state and checkbox with value 35.

Or the same thing with 20, after double click checkbox 25 need to change on checked and only this, checkbox with value 100 and 35 I don't need to change state.

I need to get something like if you double click on 300. I need double click on 100 and I need only change state for checkbox with value 100 and 35

$(document).on('dblclick', '.add_campaign_2_excel', function(e) {
    $( ".for_download_campaign").prop('checked', true);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<table>
  <tr>
    <td class="add_campaign_2_excel">
      <input class="for_download_campaign" data-downl_company="300" type="checkbox"> 300
    </td>
  </tr>
  <tr>
    <td class="expand expand-site"></td>
    <td class="add_site_2_excel">
      <input class="for_download_site" data-downl_insertion="100" type="checkbox"> 100
    </td>
  </tr>
  <tr>
    <td class="expand expand-site"></td>
    <td class="add_site_2_excel">
      <input class="for_download_site" data-downl_insertion="35" type="checkbox"> 35
    </td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td class="add_insertion_2_excel">
      <input class="for_download_insertion" data-downl_insertion="110" type="checkbox"> 110
    </td>
  </tr>

  <tr>
    <td class="add_campaign_2_excel">
      <input class="for_download_campaign" data-downl_company="323" type="checkbox"> 323
    </td>
  </tr>
  <tr>
    <td class="expand expand-site"></td>
    <td class="add_site_2_excel">
      <input class="for_download_site" data-downl_insertion="20" type="checkbox"> 20
    </td>
  </tr>
  <tr>
    <td class="expand expand-site"></td>
    <td class="add_site_2_excel">
      <input class="for_download_site" data-downl_insertion="25" type="checkbox"> 25
    </td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td class="add_insertion_2_excel">
      <input class="for_download_insertion" data-downl_insertion="1" type="checkbox"> 1
    </td>
  </tr>
</table>

about 4 years ago · Juan Pablo Isaza
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!