Viewing 6 posts - 1 through 6 (of 6 total)
The topic ‘Default open navigation menu in course status’ is closed to new replies.
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
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.
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.
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?
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
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?
share a video of your statement so that i can check the issue. trust me i did not understand your query.
The topic ‘Default open navigation menu in course status’ is closed to new replies.