PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.10
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.10
4.4.10 4.4.9.1 4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 All 142 releases
← All changes | assets/src/apps/js/frontend/single-curriculum/components/sidebar.js +12 -10 4.1.7.2 → 4.4.10 View file →
@@ -25,27 +25,22 @@
25 25 elSidebarToggle.setAttribute( 'checked', 'checked' );
26 26 } else {
27 27 elSidebarToggle.removeAttribute( 'checked' );
28 28 }
29 -
30 - document.querySelector( '#popup-course' ).addEventListener( 'click', ( e ) => {
31 - if ( e.target.id === 'sidebar-toggle' ) {
32 - LP.Cookies.set( 'sidebar-toggle', e.target.checked ? true : false );
33 - toggleSidebar( LP.Cookies.get( 'sidebar-toggle' ) );
34 - }
35 - } );
36 29 }
37 30 // End editor by tungnx
38 31
39 - const $curriculum = $( '#learn-press-course-curriculum' );
32 + // Code for old curriculum
33 + /*const $curriculum = $( '#learn-press-course-curriculum' );
40 34 $curriculum.find( '.section-desc' ).each( ( i, el ) => {
41 35 const a = $( '<span class="show-desc"></span>' ).on( 'click', () => {
42 36 b.toggleClass( 'c' );
43 37 } );
44 38 const b = $( el ).siblings( '.section-title' ).append( a );
45 - } );
39 + } );*/
46 40
47 - $( '.section' ).each( function() {
41 + // Code for old curriculum
42 + /*$( '.section' ).each( function() {
48 43 const $section = $( this ),
49 44 $toggle = $section.find( '.section-left' );
50 45
51 46 $toggle.on( 'click', function() {
@@ -64,7 +59,14 @@
64 59
65 60 LP.Cookies.remove( 'closed-section-(.*)' );
66 61 LP.Cookies.set( 'closed-section-' + lpGlobalSettings.post_id, [ ...new Set( sections ) ] );
67 62 } );
63 + } );*/
64 +
65 + document.addEventListener( 'click', ( e ) => {
66 + if ( e.target.id === 'sidebar-toggle' ) {
67 + LP.Cookies.set( 'sidebar-toggle', e.target.checked ? true : false );
68 + toggleSidebar( LP.Cookies.get( 'sidebar-toggle' ) );
69 + }
68 70 } );
69 71 };
70 72