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

321
Views
Hice un código similar, pero no funciona, no puedo entender por qué, la clase y el atributo se agregan al botón, pero el evento no funciona.

No puedo entender por qué no funciona, hice un código similar, pero no funciona, no puedo entender por qué, la clase y el atributo se agregan al botón, pero el programa de eventos no se activa y es imposible agregar una clase al elemento popup_cart como si no existiera

 $(document).ready(function(){ $(document).on("click", "#user_panel", function(){ if(typeof $(this).attr('click') === "undefined"){ $(this).attr('click', 'active' ); $(this).addClass('active_e'); $('#popup_user_panel').show(); }else{ $(this).removeAttr('click', 'active' ); $(this).removeClass('active_e'); $('#popup_user_panel').hide(); } }); $(document).mouseup(function (e) { var container = $('.top_right_nav'); if (container.has(e.target).length === 0){ $('#user_panel').removeClass('active_e'); $('#user_panel').removeAttr('click', 'active' ); $('#popup_user_panel').hide(); } }); $(document).on("click", "#panel_bag", function(){ if(typeof $(this).attr('click') === "undefined"){ $(this).attr('click', 'active' ); $(this).addClass('active_e'); $('#popup_cart').show(); }else{ $(this).removeAttr('click', 'active' ); $(this).removeClass('active_e'); $('#popup_cart').hide(); } }); $(document).mouseup(function (e) { var container = $('.top_right_nav'); if (container.has(e.target).length === 0){ $('#panel_bag').removeClass('active_e'); $('#panel_bag').removeAttr('click', 'active' ); $('#popup_cart').hide(); } }); });

ingrese la descripción de la imagen aquí

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

0

El problema está resuelto, en mi código el elemento está duplicado para las versiones móvil y completa del sitio. Gracias Tadas!

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!