Tagged: accordion slider, layout, mobile
-
AuthorPosts
-
August 15, 2016 at 1:33 pm #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.
August 15, 2016 at 3:10 pm #672691Hey 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,
YigitAugust 16, 2016 at 2:52 am #672936Dear 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
August 19, 2016 at 6:53 am #674522Hi,
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,
IsmaelAugust 19, 2016 at 7:47 am #674564Hi 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,
DarnesonAugust 19, 2016 at 10:50 am #674655Hi 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,
DarnesonAugust 23, 2016 at 2:59 am #676123Hi,
We modified the code a bit. Please try it again. Or post the login details here.
Best regards,
IsmaelAugust 23, 2016 at 9:04 am #676257Hi 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,
DarnesonAugust 26, 2016 at 6:05 am #677941Hi,
We fixed the code. Please remove browser cache before testing the page.
Best regards,
IsmaelAugust 26, 2016 at 2:41 pm #678154Hi Ismael,
many thanks for updating the code.
It works nicely now and problem solved!Many thanks again and best regards,
Darneson -
AuthorPosts
- The topic ‘Accordion Slider Mobile – 3 full width underneath each other’ is closed to new replies.