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

110
Views
JQuery para desmarcar todas las casillas de verificación dentro de div
<div id="termSheetPopup"> <div style="text-align:center;"> <select id="termSheetType"> <option>Internal</option> <option>Borrower Facing</option> </select> </div> <input type="checkbox" name="SummaryInformation">Summary Information<br /> <input type="checkbox" name="ProductLegs">Product Legs<br /> <input type="checkbox" name="AmortizationOptions">Amortization Options<br /> <input type="checkbox" name="Values">Values<br /> <input type="checkbox" name="Rates">Rates<br /> <input type="checkbox" name="RatesSpecific">Rates (All-In-Rate, PV01)<br /> <input type="checkbox" name="AmortizationSchedule">Amortization Schedule<br /> <input type="checkbox" name="SponsorInfo">Sponsor/Affiliate Info<br /> <input type="checkbox" name="BorrowerInfo">Borrower Info<br /> <input type="checkbox" name="SponsorContacts">Sponsor/Affiliate Contacts<br /> <input type="checkbox" name="CashFlows">Cash Flows<br /> <input type="checkbox" name="PrePayment">Pre-Payment<br /> <input type="checkbox" name="FutureExposure">Potential Future Exposure<br /> <input type="checkbox" name="FutureExposureSpecific">Potential Future Exposure (Max Number and Date Only)<br /> <input type="checkbox" name="History">History<br /> </div>

¿Cuál es el JQuery para eliminar todas esas casillas de verificación justo debajo de ese div?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Para desmarcar todas las casillas de verificación (como pide el título):

 $('#termSheetPopup').find('input[type=checkbox]:checked').removeAttr('checked');

Para eliminar todas las casillas de verificación (como dice la pregunta):

 $('#termSheetPopup').find('input[type=checkbox]:checked').remove();
over 4 years ago · Santiago Trujillo Report

0

Otro enfoque sería:

Asigne una clase (solo para usar como selector) a cada casilla de verificación,

 <div id="termSheetPopup"> <div style="text-align:center;"> <select id="termSheetType"> <option>Internal</option> <option>Borrower Facing</option> </select> </div> <input type="checkbox" class="chk" name="SummaryInformation">Summary Information<br /> <input type="checkbox" class="chk" name="ProductLegs">Product Legs<br /> <input type="checkbox" class="chk" name="AmortizationOptions">Amortization Options<br /> <input type="checkbox" class="chk" name="Values">Values<br /> <input type="checkbox" class="chk" name="Rates">Rates<br /> <input type="checkbox" class="chk" name="RatesSpecific">Rates (All-In-Rate, PV01)<br /> <input type="checkbox" class="chk" name="AmortizationSchedule">Amortization Schedule<br /> <input type="checkbox" class="chk" name="SponsorInfo">Sponsor/Affiliate Info<br /> <input type="checkbox" class="chk" name="BorrowerInfo">Borrower Info<br /> <input type="checkbox" class="chk" name="SponsorContacts">Sponsor/Affiliate Contacts<br /> <input type="checkbox" class="chk" name="CashFlows">Cash Flows<br /> <input type="checkbox" class="chk" name="PrePayment">Pre-Payment<br /> <input type="checkbox" class="chk" name="FutureExposure">Potential Future Exposure<br /> <input type="checkbox" class="chk" name="FutureExposureSpecific">Potential Future Exposure (Max Number and Date Only)<br /> <input type="checkbox" class="chk" name="History">History<br />

Y use la siguiente línea para marcar todas las casillas de verificación:

 $('.chk').attr("checked", true);

Para eliminar, supongo que desea eliminar la casilla de verificación junto con el título. Insértelos en un div con alguna identificación. Y elimina ese div:

 <div id="someid"><input type="checkbox" class="chk" name="SummaryInformation">Summary Information</div>

Use el siguiente código para eliminar:

 $('#someid').remove()

Esto eliminará la casilla de verificación, así como el texto, ya que se elimina el div.

over 4 years ago · Santiago Trujillo 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!