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

212
Views
ObservableHQ: cómo dar botones en eventos de clic de celda

¿Hay alguna manera de que los botones de esta celda tengan la función de hacer clic?

En este momento, esta celda solo devuelve los botones (en div.button-group ) pero su funcionalidad de clic no funciona.

 buildLegendButtons = { $('button.prev').click(function(){ let i = parseInt($(this).attr('index')); if($(this).hasClass('active')){ i = i-1; $(this).attr('index',i); $('.next').attr('index',i); $('.next').removeClass('deactive').addClass('active'); if (i === 0) { $('.prev').addClass('deactive').removeClass('active'); } } }) $('button.next').click(function(){ let i = parseInt($(this).attr('index')); if($(this).hasClass('active')){ i = i+1; $(this).attr('index',i); $('.prev').attr('index',i); $('.prev').removeClass('deactive').addClass('active'); if (i === insights.length-1) { $('.next').addClass('deactive').removeClass('active'); } } }) return html` <div class='button-group' style='padding-left: 15px'> <button class='horizontal-buttons deactive prev' index='0'><</button> <button class='horizontal-buttons active next' index='0'>></button> </div>`; }
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!