PluginProbe
Import Export Menu / trunk
Import Export Menu vtrunk
trunk 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 2.0.1 2.0.2 2.0.3 3.0.0
import-export-menu / src / assets / js / admin-menu.js

admin-menu.js in Import Export Menu trunk, at src/assets/js/admin-menu.js

36 lines 916 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ( function() {
2 const link = document.querySelectorAll(
3 '.wrap .tabs .mycontainer .myrow .box-menu a'
4 );
5 const row = document.querySelectorAll( '.wrap .data-content' );
6
7 link.forEach( function( item, index ) {
8 link[ index ].addEventListener( 'click', function() {
9 // Get id
10 const getId = '.' + this.getAttribute( 'myid' );
11
12 // Remove all class active link
13 link.forEach( function( element ) {
14 element.classList.remove( 'active' );
15 } );
16
17 // Active class link
18 this.classList.add( 'active' );
19
20 // Hide all data content
21 row.forEach( function( element ) {
22 element.classList.add( 'hide' );
23 element.classList.remove( 'active' );
24 } );
25
26 // Show data content active current
27 document
28 .querySelector( getId + '.data-content' )
29 .classList.remove( 'hide' );
30 document
31 .querySelector( getId + '.data-content' )
32 .classList.add( 'active' );
33 } );
34 } );
35 }() );
36