Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #672628

    Hi there,
    Is it possible to make the accordion slider to show each entry underneath each other on mobile, rather than next to each other?

    I have set one section to 2 and another to 3 images and it looks great on desktop, but I think it would look nicer if they would be 2 and 3 separate images underneath each other.

    #672691

    Hey darneson!

    Please try adding following code to Quick CSS in Enfold theme options under General Styling tab

    @media only screen and (max-width: 768px) {
    #top .aviaccordion {
        max-height: 100%!important;
        position: initial;
    }
    #top .aviaccordion-slide {
        position: initial;
    }}

    Best regards,
    Yigit

    #672936

    Dear Yigit,

    thnaks for your reply and the suggestion.
    I have added the css and it looks much better already. However, the sections below the accordion are now ‘hidden’ underneath the accordion slider. Would you mind having a look again and help me fixing that?

    Many thanks for your help in advance.
    Best regards;

    Darneson

    #674522

    Hi,

    Please add this in the functions.php file:

    function ava_add_custom_script(){
    ?>
    <script>
    (function($){
    	function b() {
       		var acch1 = 0,
       		    acch2 = 0,
       		    ww 	  = $(window).innerWidth();
                        console.log(ww);
    		if (ww >= 768) {
    			$('#about').css('margin-top', 0);
    			$('#video').css('margin-top', 0);
    		} else {
    			$('#portfolio + #portfolio + #accordion_slider_1 .aviaccordion-slide:not(":first-child")').each(function() {
    				acch1 += $(this).height();
    			});
    
    			$('#about + #accordion_slider_1 .aviaccordion-slide:not(":first-child")').each(function() {
    					acch2 += $(this).height();
    			});
    
    			$('#about').css('margin-top', acch1);
    			$('#video').css('margin-top', acch2);
    		}	
    	}
    
       	$(window).on('debouncedresize', function() {
       		b();
       	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'ava_add_custom_script');

    Best regards,
    Ismael

    #674564

    Hi Ismael,
    thanks for your reply.
    The code I got in the email looks very different so I’m uncertain which one is the correct one.
    Please let me know.

    Thanks,
    Darneson

    #674655

    Hi Ismael,

    ok, I have the function added now and it seams to be working.
    However the images are still overlapping the content of the container which are below the accordion.
    Please see the screenshot for better understanding.

    Thanks for your help and best regards,
    Darneson

    #676123

    Hi,

    We modified the code a bit. Please try it again. Or post the login details here.

    Best regards,
    Ismael

    #676257

    Hi Ismael,

    thanks for your reply.
    I’m not sure about the updated code and I have just copied it in, but no change on my side.
    I have created login to the backend for you. Please let em know if it is working and if you could resolve.

    Many thanks and best regards,
    Darneson

    #677941

    Hi,

    We fixed the code. Please remove browser cache before testing the page.

    Best regards,
    Ismael

    #678154

    Hi Ismael,
    many thanks for updating the code.
    It works nicely now and problem solved!

    Many thanks again and best regards,
    Darneson

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Accordion Slider Mobile – 3 full width underneath each other’ is closed to new replies.