PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, July 13, 2022

[FIXED] How to show and hide pop up onclick in pure javascript?

 July 13, 2022     ecmascript-6, frontend, javascript, reactjs, web-deployment     No comments   

Issue

i have a pop up class called "query-pop-up", i want to show and hide popup onclick in pure js. How to achicve that.

SHould i use addEverntListerner, or somethinge else.

Please let me know using this.


Solution

I'm pretty new to Javascript myself, but from what I understand in your question, it seems that you are doing some form of web design and are likely also using HTML and CSS.

You could probably use an addEventListener method, but I think the jquery toggle method would be more convenient because it allows you to 'toggle' between hide and show for all elements. Without further detail, I can't really recommend a specific implementation, but I would suggest to check out the following links:

  • https://www.w3schools.com/howto/howto_js_popup.asp
  • https://www.w3schools.com/howto/howto_js_toggle_class.asp
  • https://www.w3schools.com/jquery/eff_toggle.asp

Hope I was somewhat helpful! Good luck! :)



Answered By - zucchinigirl
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,215,697

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing