According View
How do I make an according view?
Jquery According view list.. What is a according view? How do you make a according view? This script and codes were developed by MadheswaranM on 16 November 2022, Wednesday.
According View - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>According View</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="sideNavBox"> <ul id="rootMenu" class="static root"> <li class="static level-0 selected"><a class="static menu-item-li" href="#"><span>Site 1</span></a> <ul class="static level-0-ul selected"> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 1, page 1</span></a></li> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 1, page 2</span></a></li> <li class="static level-1 selected"><a class="static menu-item-li" href="#"><span>Site 1, subsite 1</span></a> <ul class="static level-1-ul selected"> <li class="static level-2 selected"><a class="static menu-item-li selected" href="#"><span>Site 1, subsite 1, page 1</span></a></li> <li class="static level-2"><a class="static menu-item-li" href="#"><span>Site 1, subsite 1, page 2</span></a></li> </ul> </li> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 1, subsite 2</span></a> <ul class="static level-1-ul"> <li class="static level-2"><a class="static menu-item-li" href="#"><span>Site 1 subsite 2, page 1</span></a></li> <li class="static level-2"><a class="static menu-item-li" href="#"><span>Site 1 subsite 2, page 2</span></a></li> </ul> </li> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 1, page 3</span></a></li> </ul> </li> <li class="static level-0"><a class="static menu-item-li" href="#"><span>Site 2</span></a> <ul class="static level-0-ul"> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 2, page 1</span></a></li> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 2, subsite 1</span></a> <ul class="static level-1-ul"> <li class="static level-2"><a class="static menu-item-li" href="#"><span>Site 2, subsite 1, page 1</span></a></li> </ul> </li> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 2, subsite 2</span></a> <ul class="static level-1-ul"> <li class="static level-2"><a class="static menu-item-li" href="#"><span>Site 2, subsite 2, page 1</span></a></li> <li class="static level-2"><a class="static menu-item-li" href="#"><span>Site 2, subsite 2, page 2</span></a></li> </ul> </li> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 2, page 2</span></a></li> <li class="static level-1"><a class="static menu-item-li" href="#"><span>Site 2, page 3</span></a></li> </ul> </li> </ul> </div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
According View - Script Codes CSS Codes
.selected { color: green !important;
}
body { font-family: "arial";
}
a:link, a:visited, a:active { color: blue;
}
According View - Script Codes JS Codes
function accordionMe(selector, initalOpeningClass) { var speedo = 300; var $this = selector; var accordionStyle = true; // fancy or not as fancy.. (just set it to true) // disable all links with # as href, or the page will jump like a chicken on coce $this.find("li").each(function(){ // Find all these links if ($(this).find("ul").size() != 0) { // and disable them if needed if ($(this).find("a:first").attr('href') == '#') { $(this).find("a:first").click(function(){ return false; }); } } }); // Hide every ul first $("#rootMenu li>ul").hide(); // Open all items (depending on the class you chose) $this.find("li."+initalOpeningClass).each(function(){ $(this).parents("ul").slideDown(speedo); }); // and now.. time for magic $this.find("li a").click(function(){ if ($(this).parent().find("ul").size() != 0) { if (accordionStyle) { if(!$(this).parent().find("ul").is(':visible')){ // get all parents parents = $(this).parent().parents("ul"); // get all visible ul's' visible = $this.find("ul:visible"); // Loop through visible.each(function(visibleIndex){ // check if parent was closed var close = true; parents.each(function(parentIndex){ if(parents[parentIndex] == visible[visibleIndex]){ close = false; return false; } }); // if closed, close parent if(close) if($(this).parent().find("ul") != visible[visibleIndex]) $(visible[visibleIndex]).slideUp(speedo); }); } } // if the parent was shown at first, hide him and vica versa if($(this).parent().find("ul:first").is(":visible")) $(this).parent().find("ul:first").slideUp(speedo); else $(this).parent().find("ul:first").slideDown(speedo); } }); // einde klik event } accordionMe($("#rootMenu"), "selected");
Developer | MadheswaranM |
Username | madhes |
Uploaded | November 16, 2022 |
Rating | 3 |
Size | 2,689 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Flip test | 1,635 Kb |
Simple hover effect for delete option | 1,578 Kb |
According height change | 1,885 Kb |
Custom checkboxes with CSS only | 2,436 Kb |
A Pen by MadheswaranM | 1,765 Kb |
Menu hover effect | 1,661 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Simple Login Form Template | Banunn | 3,571 Kb |
Firefox Breakout Guide | Quincysoeliman | 2,576 Kb |
Barber Shop | Bhlaird | 6,270 Kb |
Word Wrap Algorithm for Multiline Canvas Text | Peterhry | 2,349 Kb |
CSS3 Button Examples | Volusion | 3,377 Kb |
A Pen by Tosh | Panev | 2,586 Kb |
E-mail Template | SoloMDFK | 4,871 Kb |
Haml Calendar | Katydecorah | 5,643 Kb |
A Different Type of Gallery | DonPage | 2,950 Kb |
Mobile first social buttons with no iframe | Alistairtweedie | 3,158 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!