Responsive Blue Accordion

Size
3,045 Kb
Views
10,120

How do I make an responsive blue accordion?

This is a very easy to use responsive jQuery accordion.. What is a responsive blue accordion? How do you make a responsive blue accordion? This script and codes were developed by Brendan Skousen on 09 December 2022, Friday.

Responsive Blue Accordion Previews

Responsive Blue Accordion - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Responsive Blue Accordion</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="blue" id="accordion"> <h3>Enter Title 1</h3> <div> <img src="http://placehold.it/150x170" style= "margin-right: 10px; float: left;"> <p>Bacon ipsum dolor sit amet jerky capicola shank ball tip venison. Prosciutto kielbasa chicken, pork loin shoulder fatback frankfurter tenderloin short loin andouille capicola filet mignon. Turducken boudin prosciutto pork, ball tip tri-tip pork belly pork loin. Frankfurter kielbasa ball tip short ribs pork belly, ham hock chicken meatball brisket beef flank jerky. Cow hamburger meatloaf doner short ribs turducken ham tenderloin ground round flank jerky jowl corned beef spare ribs. T-bone salami kielbasa boudin biltong short loin hamburger beef pancetta sirloin tenderloin shank ball tip.</p> </div> <h3>Enter Title 2</h3> <div> <p>Bacon ipsum dolor sit amet jerky capicola shank ball tip venison. Prosciutto kielbasa chicken, pork loin shoulder fatback frankfurter tenderloin short loin andouille capicola filet mignon. Turducken boudin prosciutto pork, ball tip tri-tip pork belly pork loin. Frankfurter kielbasa ball tip short ribs pork belly, ham hock chicken meatball brisket beef flank jerky. Cow hamburger meatloaf doner short ribs turducken ham tenderloin ground round flank jerky jowl corned beef spare ribs. T-bone salami kielbasa boudin biltong short loin hamburger beef pancetta sirloin tenderloin shank ball tip.</p> <ul> <li>List Item 1</li> <li>List Item 2</li> <li>List Item 3</li> <li>List Item 4</li> </ul> </div> <h3>Enter Title 3</h3> <div> <p>Bacon ipsum dolor sit amet jerky capicola shank ball tip venison. Prosciutto kielbasa chicken, pork loin shoulder fatback frankfurter tenderloin short loin andouille capicola filet mignon. Turducken boudin prosciutto pork, ball tip tri-tip pork belly pork loin. Frankfurter kielbasa ball tip short ribs pork belly, ham hock chicken meatball brisket beef flank jerky. Cow hamburger meatloaf doner short ribs turducken ham tenderloin ground round flank jerky jowl corned beef spare ribs. T-bone salami kielbasa boudin biltong short loin hamburger beef pancetta sirloin tenderloin shank ball tip.</p> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Responsive Blue Accordion - Script Codes CSS Codes

/* Add this to import Font-Awesome */
@import url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
/* Add this to important Google Font (Oswald) */
@import url(https://fonts.googleapis.com/css?family=Oswald:400,300,700);
/* Main accordion css */
#accordion { /max-width: 700px; /* You can change this */ margin: auto; /* You can remove this if you do not need it to align in the center of your element */ display: block;
}
/* This controls the text inside the div, you can play with this by adding background-color, border, etc. */
#accordion div { padding: 5px 10px; display: inline-block; overflow: auto;
}
/* This controls the header */
#accordion h3 { display: block; text-decoration: none; outline: none; cursor: pointer; padding: 8px 11px; font-family: Oswald, sans-serif; letter-spacing: 1px; font-weight: 700; margin: 5px;
}
#accordion div p { margin-top: 0;
}
/* This CSS controls the Font Awesome Icon, You can float: left as well and add margin-right: 5px; */
.icon-expand,.icon-collapse { float: right; margin-top: 5px;
}
/* USE THE BELOW CSS FOR BLUE */
.blue h3 { background: #377ad0; /* You can change this to whatever background color you want for the header */ color: #fff; /* You can change this to whatever font color you want for the header */
}

Responsive Blue Accordion - Script Codes JS Codes

// Make sure you add the jQuery Library and jQuery UI
$(function() { $("#accordion").accordion({ // You can change this to auto or fill for more info view https://api.jqueryui.com/accordion/#option-heightStyle heightStyle: "content", // Set this to true if you want the active accordion to remain open collapsible: true, // SSetting active to false will collapse all panels. This requires the collapsible option to be true. active: false }); //initialize accordion $("#accordion").accordion(); //set accordion header options $("#accordion").accordion("option", "icons", { // You can change this to differnt Font Awesome class 'header': 'icon-expand', // You can change this to differnt Font Awesome class 'activeHeader': 'icon-collapse' });
});
Responsive Blue Accordion - Script Codes
Responsive Blue Accordion - Script Codes
Home Page Home
Developer Brendan Skousen
Username bskousen
Uploaded December 09, 2022
Rating 3.5
Size 3,045 Kb
Views 10,120
Do you need developer help for Responsive Blue Accordion?

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!

Brendan Skousen (bskousen) Script Codes
Create amazing blog posts 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!