Multiple Expand Collapse

Size
2,733 Kb
Views
42,504

How do I make an multiple expand collapse?

This multiple expand collapse using Adipalaz expand collapse plugin http://www.adipalaz.com/scripts/jquery/expand.js . You can see the original resource here http://www.adipalaz.com/experiments/jquery/multiple_expand_all_collapse_all.html. What is a multiple expand collapse? How do you make a multiple expand collapse? This script and codes were developed by Dzulfikar Adi Putra on 06 September 2022, Tuesday.

Multiple Expand Collapse Previews

Multiple Expand Collapse - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Multiple Expand Collapse</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="content"> <h1>Expand Collapse Element</h1> <h2>using <a href="http://www.adipalaz.com/experiments/jquery/multiple_expand_all_collapse_all.html
">Adipalaz jquery expand.js</a> and modified by me</h2>
<h3 class="expand">Title 1</h3> <div class="collapse"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> <h3 class="expand">Title 2</h3> <div class="collapse"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div> <h3 class="expand">Title 3</h3> <div class="collapse"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://www.adipalaz.com/scripts/jquery/expand.js'></script> <script src="js/index.js"></script>
</body>
</html>

Multiple Expand Collapse - Script Codes CSS Codes

/* start of my own code */
h2 a{ color : #fff !important;
}
h1{ color :#438228 !important;
}
h2, h2 a:hover{ background-color : #63AA44 !important;
}
/* end of my own code */
.collapse p {padding:0 10px 1em}
.switch {position:absolute; top:1.5em; right: 1.5em; padding:3px}
.post .switch {position:static; text-align:right}
.post .main{margin-bottom:.3em; padding-bottom:0}
.other li, .summary {margin-bottom:.3em; padding:1em; border:1px solid #e8e7e8; background-color:#f8f7f8}
.other ul {list-style-type:none; text-align:center}
/* --- Headings --- */
h1 { margin-bottom:1em; font-family:georgia,'times new roman',times,serif; font-size:2.5em; font-weight:normal; color:#c30
}
h2 {margin-bottom:1em; padding:3px; background-color:#eee}
h2, h3{font-size:1em}
.expand{padding-bottom:.75em}
/* --- Links --- */
a:link, a:visited { border:1px dotted #ccc; border-width:0; text-decoration:none; color:blue
}
a:hover, a:active, a:focus { border-style:solid; background-color:#f0f0f0; text-decoration:underline; outline:0 none
}
a:active, a:focus { color:red;
}
.expand a { display:block; padding:3px 10px
}
.expand a:link, .expand a:visited { border-width:1px; background-image:url(img/arrow-down.gif); background-repeat:no-repeat; background-position:98% 50%;
}
.expand a:hover, .expand a:active, .expand a:focus {
}
.expand a.open:link, .expand a.open:visited { border-style:solid; background:#eee url(img/arrow-up.gif) no-repeat 98% 50%
}

Multiple Expand Collapse - Script Codes JS Codes

$("#content h3.expand").toggler();
Multiple Expand Collapse - Script Codes
Multiple Expand Collapse - Script Codes
Home Page Home
Developer Dzulfikar Adi Putra
Username superpikar
Uploaded September 06, 2022
Rating 3
Size 2,733 Kb
Views 42,504
Do you need developer help for Multiple Expand Collapse?

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!

Dzulfikar Adi Putra (superpikar) Script Codes
Create amazing web content with AI!

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!