Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
It's possible to execute css on javascript function

I need to change CSS when i click on picture. I do somes search and i find the function onclick="js function" but i don't know how to execute the css. Here is the css i need to execute on the function onclick=""

.all:hover {
perspective: 1000px;
transition: all 1.3s ease-in;
transform: perspective(10000px) rotateX(0deg);
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

this is a way for what you want:

1- Give an ID to your picture

2- you should create a class in your css file and give it these "hover" styles.

3- you should create a js function and call it with "onclick" picture event. in this example, I called my function, "myFunction".

4- create a script tag and write this function for what you want:

function myFunction() {
  var element = document.getElementById("your picture ID");
  element.classList.add("Put the class you just created in your css file");
} 
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda