Avada › Forums › Community Forum › Tabs Closed on mobile
-
AuthorPosts
-
I would like to know if there is a way anyone has found to have the tabs closed on mobile? As it is the first tab is auto open.
I was looking for the same thing.
Unfortunately nobody from avada support has answered yet.my “solution” is to use a script.
<script> jQuery( document ).ready(function() { jQuery('.tab-pane').removeClass( 'active' ); }); </script>
you can use it with the “code block” element and make it only “visible” on small screen.
Hello,
The script is working! But I cant figure out how the visibility works. The script applies to my desktop page too. I cant set the visibility of the code block element to small screen. Can u send a picture to help me?
Thanks in advance,
Kind regards,
vdvwebdesignTo fire the script only on small windows add
if(window.innerWidth <= 760){ ...yourscripthere... }
Note that the script fires only once so there will be no change if you change the screen size after it loads unless you refresh the page.
-
AuthorPosts
- You must be logged in to reply to this topic.