A Pen by Siyanda Maphumulo on CodePen.
Created
August 17, 2017 06:17
-
-
Save anonymous/7eca0a445480f7a13ead7b1568f770ea to your computer and use it in GitHub Desktop.
GvOBYO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <body class="dsd1132"> | |
| <header class="header-menu"> | |
| <h1>Main Menu</h1> | |
| </header> | |
| <div class="page-content"> | |
| <div class="menu-box"> | |
| <ul class="menu-list"> | |
| <li>1. Infomation Display</li> | |
| <li>2. Parental Control</li> | |
| <li>3. Language Options</li> | |
| <li>4. Mail Messages</li> | |
| <li>5. Display Settings</li> | |
| <li>6. Information Display Perio</li> | |
| <li>7. Advanced Options</li> | |
| </ul> | |
| <ul class="menu-list hidden" id="first"> | |
| <li>First</li> | |
| <li>Second</li> | |
| <li>Third</li> | |
| </ul> | |
| </div> | |
| </div> | |
| <footer class="page-footer"> | |
| <div>Select | |
| <button>OK</button> | |
| </div> | |
| <div>Return | |
| <button id="reset">Back</button> | |
| </div> | |
| </footer> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).ready(function() { | |
| var | |
| $menuListItem = $(".menu-list li"), | |
| $menuListChild = $(".menu-list li ul"), | |
| $menuList = $(".menu-list"); | |
| $menuListItem.click(function (e) { | |
| console.log(this); | |
| // e.preventDefault(); | |
| $menuListItem.removeClass("shown"); | |
| $(this).parent('ul').toggleClass("hidden"); | |
| $("#first").removeClass("hidden"); | |
| // var activeTab = $(this).find("a").attr("href"); | |
| $menuListChild.fadeIn(); | |
| }); | |
| $("#reset").click(function (e) { | |
| console.log("reset") | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .hidden { | |
| display:none; | |
| } | |
| $grey : #bdbdbd; | |
| $yellow : #fee902; | |
| $purple: #632286; | |
| html, | |
| body, | |
| .dsd1132 { | |
| height: 100%; | |
| width:100%; | |
| color:black; | |
| background:$purple; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| a { | |
| text-decoration:none; | |
| color:black; | |
| } | |
| li::first-letter { | |
| border-right:2px solid $purple; | |
| padding:10px; | |
| } | |
| .menu-box { | |
| margin:10em; | |
| width:100%; | |
| cursor:pointer; | |
| } | |
| .menu-list li { | |
| background:$grey; | |
| padding:10px; | |
| border:1px solid $purple; | |
| border-radius:2px; | |
| } | |
| .menu-list li:hover{ | |
| background:$yellow; | |
| } | |
| h1,h2,h3 { | |
| display: block; | |
| margin-top: 0.2em; | |
| margin-bottom: 0.67em; | |
| margin-left: 0; | |
| margin-right: 0; | |
| } | |
| h1 { | |
| font-size: 1.8rem; | |
| } | |
| h2 { | |
| font-size: 1.1em; | |
| } | |
| h3 { | |
| font-size: 1rem; | |
| color: black; | |
| } | |
| button { | |
| padding:10px; | |
| margin:2px; | |
| border:none; | |
| border-radius:2px; | |
| cursor:pointer; | |
| } | |
| footer button { | |
| background:darken(darkgray, 45%); | |
| color:white; | |
| } | |
| .page-content { | |
| flex: 1 1 auto; | |
| position: relative;/* need this to position inner content */ | |
| overflow-y: auto; | |
| display: flex; | |
| align-items:center; | |
| } | |
| .header-menu,.page-footer { | |
| background:$grey; | |
| padding:15px; | |
| text-align:center; | |
| } | |
| .header-menu,.page-footer { | |
| flex: 0 0 auto; | |
| display:flex; | |
| justify-content:space-between; | |
| flex-direction:row; | |
| } | |
| .header-menu { | |
| justify-content:space-around; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment