I hope you are having a nice day. I am working with the following menu:
The site with which I am working is a Single Page, I need that when clicking any of the buttons that work as anchors to different sections (referenced by ID) they also close this popup. Any idea how to do it? I can work perfectly with JS and jQuery, I know these technologies a lot.
Thanks for reading and giving me your time. I await your responses. Greetings.
I hope you are having a nice day. I am working with the following menu:
The site with which I am working is a Single Page, I need that when clicking any of the buttons that work as anchors to different sections (referenced by ID) they also close this popup. Any idea how to do it? I can work perfectly with JS and jQuery, I know these technologies a lot.
Thanks for reading and giving me your time. I await your responses. Greetings.
Share Improve this question asked Nov 14, 2021 at 17:15 Santiago ParadeloSantiago Paradelo 932 silver badges11 bronze badges 1- 1 Hi and wele to stackoverflow. Sorry, but SO is not a code-writing or tutoring service. We can help solve specific, technical problems, not open-ended requests for code or advice. Please edit your question to show meta.stackoverflow./questions/260648/…, and what specific problem you need help with. See the stackoverflow./help/how-to-ask page for details on how to best help us help you. – Howard E Commented Nov 14, 2021 at 17:49
1 Answer
Reset to default 5I have this working for me:
give the buttons on your popup an additional class of 'close-popup'
add an HMTL widget to your popup with the following
<script> jQuery( document ).ready( function( $ ) { $( document ).on( 'click', '.close-popup', function( event ) { elementorProFrontend.modules.popup.closePopup( {}, event ); } ); } ); </script>
I'd like to be able to claim the credit for this, but it goes to shilo-ey