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

173
Views
Cómo detectar la identificación de un elemento en js

Así que estoy creando un juego inactivo y quiero que aparezca una descripción en la parte inferior cada vez que pasas el cursor sobre un botón. Le he dado a cada botón una identificación y una clase, la clase es para detectar cuándo pasa el mouse sobre cualquier botón y la identificación para establecer los datos para la descripción. Para su información, también estoy usando Jquery.

Aquí está el código:

HTML:

 <button id="pick" class="shopButton">Pick a carrot</button> <button id="refine" class="shopButton"Refine carrots</button>

JS:

 $(".shopButton").mouseenter(function showDescription() { document.getElementById('description').style.display = "block"; document.getElementById('descriptionHeader').innerHTML = document.getElementById('descriptionText').innerHTML = }); const pick = { header = "Header"; text = "Text"; }

¿Cómo debería hacer esto?

Todavía no he probado nada porque no sé qué funcionaría (soy bastante nuevo en js)

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!