How to Show and Hide Containers with Clicking Buttons - Elementor Wordpress Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.ย. 2024
  • Updated Video with how to reveal Containers when you click on a button.
    Code comes from: element.how/el...
    Book your 1-2-1 Consultation: websquadron.co...
    How to Show and Hide Containers with Clicking Buttons - Elementor Wordpress Tutorial
    We love to create - share - respond - and deliver.
    🧐 Learn with our Mastery Modules: websquadron.co...
    🔗 All of our Important Links: websquadron.co...
    😃 Join our Facebook Group: / 3309523509284305
    😃 Get Code Snippets Pro: r.freemius.com...
    😃 Get Elementor Pro: be.elementor.c...
    😃 Boost your TH-cam Analysis: www.tubebuddy....
    👕 Get our Merchandise: websquadron.co...
    🥹 Support us: paypal.me/Webs...
    Hire us to work on your Website!
    💌 info@websquadron.co.uk
    👩‍💻 Visit websquadron.co.uk

ความคิดเห็น • 79

  • @antoniorodriguezvasquez7773
    @antoniorodriguezvasquez7773 ปีที่แล้ว +7

    Hey there! Looks like the author of the code updated it, now you need to set toggleElem for the button and toggleContent for the Container. Thanks for the Video!

    • @omat1000
      @omat1000 ปีที่แล้ว

      hello I have a question where to set toggleElem for the button and toggleContent for the Container thx for your help

    • @elementhow691
      @elementhow691 ปีที่แล้ว +1

      @@omat1000 these are the class names that go on these elements, under Advanced > CSS classes

    • @wideokompakt7067
      @wideokompakt7067 5 หลายเดือนก่อน

      Thank you for this! Guys just set the button CSS class to ''toggleElem'' and container to ''toggleContent''. Shame author does not care to pin this comment..

    • @waterlaw8912
      @waterlaw8912 13 วันที่ผ่านมา

      hero you save my life men

  • @waterlaw8912
    @waterlaw8912 13 วันที่ผ่านมา +1

    thanks for the video, master!!!!

  • @febrisadhayaga976
    @febrisadhayaga976 2 หลายเดือนก่อน +1

    Thank you man!. I am your new subscriber now

  • @HossamKhalaf-sr1oo
    @HossamKhalaf-sr1oo ปีที่แล้ว

    Thanks man!, I become addicted to your channel, I always find the answer to my problems in your channel
    ❤️ From Egypt

  • @slhdono
    @slhdono 9 หลายเดือนก่อน

    Thank you very much for providing the free code, this solved my problem.

  • @virginiaciancia
    @virginiaciancia 9 หลายเดือนก่อน +1

    Excellent! Thanks for sharing and such a good explanation! You deserve a like
    Blessings from Argentina.

    • @websquadron
      @websquadron  9 หลายเดือนก่อน +1

      Thanks

  • @riposte109
    @riposte109 ปีที่แล้ว +1

    This is awesome. Thanks man. Now, I would like to use this pretty much as an "advanced" accordions, so I would need to put this within a parent container. Any idea why when it's in another container it doesn't work? Thanks again!

    • @websquadron
      @websquadron  ปีที่แล้ว +1

      Not sure why it wouldn’t.

  • @hendriamayabeats8739
    @hendriamayabeats8739 6 หลายเดือนก่อน +1

    Thanks a lot !!

  • @wellpal
    @wellpal 7 หลายเดือนก่อน

    truly love your content and easy breakdown of "mental models" when it comes to Elementor. Helped me a lot in applying the basic instruction to more custom scenarios.
    With this specific piece of code I seem to run into the following issue: When all is applied and I check the preview is works flawlessly. When I refresh the page to show it again, the button click doesn't reveal anything (inactive). After waiting a while or making adjustments on the page in elementor view and updating, the function works again. And so on... IS there maybe something I'm overlooking?

    • @websquadron
      @websquadron  7 หลายเดือนก่อน

      Are you getting any JS issues when you inspect?

    • @wellpal
      @wellpal 7 หลายเดือนก่อน

      Hey Imran, thank you fro taking the time to respond. Appreciate it! I found the problem, it was a z-index issue blocking "actions" due to the overlay. @@websquadron

  • @patrissalehi1651
    @patrissalehi1651 ปีที่แล้ว +1

    Amazing video and thank you so much ❤.
    A question about the Java Script code: is it possible to add the code to the child theme function.php folder and use it for different sections or pages?
    Thanks

    • @websquadron
      @websquadron  ปีที่แล้ว

      Not sure if that would work as it’s dependent on the placement but I suppose it could be modified

  • @vinsonlozano60
    @vinsonlozano60 9 หลายเดือนก่อน

    Thank you so much for sharing this awesome tutorial. Is there a way to use the same toggle function to a crocoblock apply filter button? When a user hit the apply filter button a section will collapse. I have tried adding the css class, but it didn't work.

    • @websquadron
      @websquadron  9 หลายเดือนก่อน

      Not completely sure about if it will work

  • @Pivot_Promotions
    @Pivot_Promotions 29 วันที่ผ่านมา

    I have two images side by side in a container that is set for row. It looks perfect in the builder window but when I run it as a preview, the two images are stacked vertically. Any idea why this would be happening?

    • @Pivot_Promotions
      @Pivot_Promotions 29 วันที่ผ่านมา

      I made the next section a grid instead of a flex and it worked.

  • @pixelgap
    @pixelgap ปีที่แล้ว

    Nice. Thank you Imrran

  • @mikedebest5901
    @mikedebest5901 5 หลายเดือนก่อน

    You are great. But I don't understand why you do not post the code in the comments. It is impossible to find with the link that you provided.

    • @websquadron
      @websquadron  5 หลายเดือนก่อน +1

      Because the code is created by someone else and out of respect and agreement with them, I added a link back to them. It was a mutual agreement :)

  • @WebZone360
    @WebZone360 ปีที่แล้ว

    Thank you, Boss

  • @carolinaurrutia485
    @carolinaurrutia485 ปีที่แล้ว

    Hi, is it possible to show and hide sections or containers by scrolling down and scroll up?
    Your channel is a great help to the Elementor community.
    Regards.

    • @websquadron
      @websquadron  ปีที่แล้ว +1

      Technically yes by adding fade in and fade out based on the Section/Container Scrolling Effects.
      Go to the advanced tab.
      Then motion effects.
      Then modify the Fade in and Fade out.

    • @carolinaurrutia485
      @carolinaurrutia485 ปีที่แล้ว

      @@websquadron Thank you very much for your reply. I think those steps are at a level beyond my knowledge at the moment. I will investigate.
      I think this topic and your explanation can serve you for an upcoming tutorial that, surely, those of us who are part of your community will appreciate.

  • @visualmodo
    @visualmodo ปีที่แล้ว

    Excellent content :)

  • @ggiavasis
    @ggiavasis ปีที่แล้ว

    Any advice on some code that will change the style of the active button?
    Let's say all the buttons were in a row at the top, and each button would reveal one item below and hide the others. How could we style the active button?

    • @websquadron
      @websquadron  ปีที่แล้ว

      Inspect it and get the class name.
      Maybe try:
      a:active {
      background-color: yellow;
      }
      Good luck.

  • @JeffNeukom
    @JeffNeukom ปีที่แล้ว

    Great video! Very helpful for visual learners like myself.
    Do you think this could be made to work within a popup? For some reason, when it's in a popup, the second section doesn't appear when clicked, though I tested the same layout on a page and it worked. Does the script need to be tweaked to suit a popup vs living on a page?

    • @websquadron
      @websquadron  ปีที่แล้ว +1

      Might not work due to the extra JS.
      But you could have a button in the pop up open another pop up (and the setting would close the last pop up automatically)

  • @giardi9939
    @giardi9939 3 หลายเดือนก่อน

    the code in the link is changed, you need to set the button css class to "toggleElem" for the button and "toggleContent" for the container want to show/hide.

  • @vekenbakrad9494
    @vekenbakrad9494 ปีที่แล้ว

    Thank you for the amazing video. QUESTION: Is this SEO friendly? Will the page rank if you had certain texts hidden? Or should we submit a sitemap to google for ranking? what is your recommendation?

    • @websquadron
      @websquadron  ปีที่แล้ว

      The page will still show the keywords as they’re part of the html and will be present in the sitemap so it’s fine

    • @vekenbakrad9494
      @vekenbakrad9494 ปีที่แล้ว

      @@websquadron Perfect :) Thank you so much for clarifying

    • @basikbasilik7294
      @basikbasilik7294 ปีที่แล้ว

      @@websquadron You 100% sure ? Not better to have different container like in your 2nd example on your demo site ?

  • @LouOficial
    @LouOficial 2 หลายเดือนก่อน

    Hi! The code in the page is different of the code on the video. How can I fin the code of the video? Thanks!!

    • @websquadron
      @websquadron  2 หลายเดือนก่อน

      Use the link for the final code

  • @namanjain1137
    @namanjain1137 ปีที่แล้ว +1

    I followed all the steps properly but not getting the results.
    Let me tell you steo by step & there’ll be any issue kindly help me then.
    1- I added first main container
    2- In that main container i added
    a) html widget
    b) button widget(css class: toggleElem)
    3 then i added second container with(css class: togglecontent)
    4 In that second container i just added 1 image that’s it.
    5 then in responsive i marked second container to hide on all three devices.
    But still when i click on the button nothing happens.
    Please help ??

    • @websquadron
      @websquadron  ปีที่แล้ว

      Might need to double check what you have - but that's 1-2-1 consultation.

  • @servicemanager1816
    @servicemanager1816 ปีที่แล้ว

    Great vid! Is there a way to do that on hover, instead of on click?

    • @websquadron
      @websquadron  ปีที่แล้ว

      Would it be sequential (hover 1 that leads to hover 2 that leads to hover 3) or just a single point whereby you hover to see one item.

    • @servicemanager1816
      @servicemanager1816 ปีที่แล้ว

      @@websquadron Sequentially would be awesome

  • @desabells
    @desabells 7 หลายเดือนก่อน

    It was simple to implement and worked great but with one exception. If any popup on the page is initiated first then the button will not work. If you first click the button then the container will show but if you then click and initiate a popup the button no longer closes the container. So at least in my case a popup button kills it.

    • @websquadron
      @websquadron  7 หลายเดือนก่อน

      Multiple JS can do that :(

  • @plantbasedprepper
    @plantbasedprepper 8 วันที่ผ่านมา

    What if I don't want to pay for Elementor and just use Wordpress?

    • @websquadron
      @websquadron  7 วันที่ผ่านมา

      Adapt the code for that :)

  • @dogsauce19
    @dogsauce19 7 หลายเดือนก่อน

    Can this be used to show or hide custom html like an ?

    • @websquadron
      @websquadron  7 หลายเดือนก่อน +1

      Yes if it’s inside a container

  • @corinagrether
    @corinagrether 10 หลายเดือนก่อน

    Hi Imran I would like to achieve the same with a container sliding in from right to left on a button click (horizontally). I've tried the pop-up solution but it's not the right thing to do...any advice? THX

    • @websquadron
      @websquadron  10 หลายเดือนก่อน

      Any reason why the pop up solution wasn’t right

    • @corinagrether
      @corinagrether 10 หลายเดือนก่อน

      @@websquadron​​⁠Hello!! Thx for reply. The reason why was the underneath site scroll which wasn’t disabled, although I’ve blocked it in the advanced tab (pop). So on the pop-up never stay in its place beside the image where I would need it…

    • @corinagrether
      @corinagrether 10 หลายเดือนก่อน

      There was a conflict in between a smooth scroll js for the page and the pop-up. But i do need absolutely that js for smooth scrolling....for now i could achieve the issue with the show/hide js from element.how

  • @advanced-developers
    @advanced-developers ปีที่แล้ว

    good

  • @mikedebest5901
    @mikedebest5901 5 หลายเดือนก่อน

    This does not work. "Showme" must be outdated for the code provided as it is not in there.

    • @websquadron
      @websquadron  5 หลายเดือนก่อน

      Rename it to match the names you give.

  • @tomiastudio
    @tomiastudio ปีที่แล้ว

    Couldn't this be now done with the new nested tabs widget? 🤔

    • @websquadron
      @websquadron  ปีที่แล้ว +2

      Yup if you want the tabs ;)
      This is the alternate way with buttons or even icons.

  • @decrea8439
    @decrea8439 ปีที่แล้ว

    does it work with sections?

    • @websquadron
      @websquadron  ปีที่แล้ว +1

      The page has code for Sections or Containers :)

  • @garycannon5255
    @garycannon5255 ปีที่แล้ว

    Did anyone get this working with inner containers??

  • @newwavekill
    @newwavekill 7 หลายเดือนก่อน

    HEY IT´S NOT POSSIBLE TO ACCES THE CODE GIVES ERROR 403!

    • @websquadron
      @websquadron  7 หลายเดือนก่อน

      I just clicked the link and it went straight there. Change your browser

  • @stomataaa
    @stomataaa 7 หลายเดือนก่อน

    does not work

    • @websquadron
      @websquadron  7 หลายเดือนก่อน

      It does for me and others, sorry.

  • @genethompson9154
    @genethompson9154 ปีที่แล้ว

    Imran, I'm sure you've been spying on me!! I've been trying to solve this exact problem in Bricks. Any reason why this wouldn't work in Bricks?

    • @websquadron
      @websquadron  ปีที่แล้ว +2

      It'll be the code that is using Elementor Container IDs.
      When I get a chance I'll dig into a Bricks Version.

    • @genethompson9154
      @genethompson9154 ปีที่แล้ว

      @@websquadron Thank you

  • @PatriciaYaness
    @PatriciaYaness 18 วันที่ผ่านมา

    Confusing and large explanation...

  • @alobosk
    @alobosk ปีที่แล้ว +2

    The website to get the code is a scam! Beware.

    • @websquadron
      @websquadron  ปีที่แล้ว +1

      No it’s not.
      Element.How is a very respected website.
      How is it a scam?

    • @lauramcfalls434
      @lauramcfalls434 ปีที่แล้ว +1

      I got the code and directions from the site with no issues. Not a scam.

    • @wellpal
      @wellpal 7 หลายเดือนก่อน

      same here. no scam at all. I did have to register/login to reveal it, but given that they provide you a valuable free resource, I think it's very much ok. If that was your classification of "scam" at least.