Default open navigation menu in course status

Home Forums Legacy Support Support queries How-to & Troubleshooting Default open navigation menu in course status

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #211659
    gsjaak
    Spectator
    Hi! I would like to show the course navigation (so the curriculum with all the lessons) by default on the left side when you open the course status on a MOBILE device. See: http://prntscr.com/nvtulh Is there an easy js trick to make the left menu on opening the page? Kind regards
    #211816
    logan
    Member
    Hello, Paste this code in your wp-admin >> wplms >> footer > google analytics code. <script> $(document).ready(function() {   setTimeout(function() {   $(".course_pursue_panel .course_timeline.accordion ul>li.section:nth-child(n+2)").trigger('click');   }, 100);   }); </script> it will open all accordions by default on page load.
    #212029
    gsjaak_118
    Participant
    thanks for the reply! Tho this is not what I mean. I want to show the left panel (completly) by default on a mobile device. see: https://prnt.sc/nx13xg   I have rewritten the code a bit $(document).ready(function() { setTimeout(function() { $("#hideshow_course_pursue_panel").trigger('click'); }, 0); }); So this does opens the panel on pageload, but it first closes and then opens the panel. This looks a bit glitchy. Is there a way to just prevent the panel from hiding on pageload? Also how can I restrict this code to mobile devices?    
    #212132
    logan
    Member

    Hello,

    Paste this code in your wp-admin >> wplms >> footer > google analytics code.

    <script>

    jQuery(document).ready(function($) { if($(window).width() <= 992){ $(".course_pursue_panel .course_timeline.accordion ul>li.section:nth-child(n+2)").trigger('click'); $("div#hideshow_course_pursue_panel").trigger('click'); } });

    </script>

    it will open all accordions by default on page load. Here: https://cl.ly/4ed2fc
    #212169
    gsjaak_118
    Participant
    thanks! hmmm okay bit strange, but for me it only works if i edit the code like this: $(document).ready(function() { if($(window).width()   it needs to use the timeout function. It still remains a glitchy, you see the menu going hiding and showing. why doesnt this work?
    #212205
    logan
    Member
    share a video of your statement so that i can check the issue. trust me i did not understand your query.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Default open navigation menu in course status’ is closed to new replies.