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

85
Views
JQuery to hide container with no class or ID

I have a site with a container called 'afterpay-placement'. In certain situations I want to remove that container. But it is just

    <afterpay-placement etc. > 

and then closed with

    </afterpay-placement>

How do I select that container?

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

0

More context on your code would be helpful to write this the proper way however this works.

$("afterpay-placement").hide();

https://jsfiddle.net/6xm2k8ov/

about 4 years ago · Juan Pablo Isaza Report

0

Another approach to hide afterpay-placement

 $(document).ready(function() {
        $("button").click(function() {
          $("afterpay-placement").css("display","none");
        });
      });
<!DOCTYPE html>
<html>

  <head>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
   </head>

  <body>
    <afterpay-placement>Container to Hide.</afterpay-placement>

    <button>Click to Hide Container</button>

  </body>

</html>

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!