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

146
Views
hiperíndice equivalente de jquery .on("clic"

 $( document ).ready(function() { console.log( "ready!" ); var counter = 0; $("button").click(function() { e="<p class='test' _=\"on click append 'click me' to value of the #search\">click me</p>" $("h2").append(e) }); // With on(): $("h2").on("click", "p.test", function(){ alert($(this).text()); }); });
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://unpkg.com/hyperscript.org@0.8.1"></script> <input id="search" /> <button>generate new element</button> <h2></h2>

El jquery funciona, pero el hiperíndice no agrega texto al cuadro de entrada.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Bueno, su código de hiperíndice parece funcionar como pretendía. El jQuery parece ser el roto. Si quiere agregar al valor que el usuario está escribiendo. Deshazte de la adición de jQuery y solo usa _hyperscript.

 <script src="https://unpkg.com/hyperscript.org@0.8.1"></script> <input id="search" /> <button _="on click append 'click me' to value of the #search">generate new element</button> <h2></h2>
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!