The problem may be that the page is too long and/or too boring to engage the user completely.
Your content may be boring. Visitors love to skip over paragraphs and skim through a page. If they like what they see they might go back to read the rest of the page. Accordion boxes make your page more interesting. They can engage the reader with a little fun.
Accordion boxes use animation to show/hide content making pages shorter and more interesting. Click on a title to open/close the content panel. Engage users longer, improve click through rate, time on page and bounce rate. Check it Out.
Create dropdown like accordion boxes with text links, images or fancy buttons. This code works on any element and is mobile responsive. Made Easy tutorial explains how to incorporate them into your website. Basically you include jQuery and the A-B javascript into your page. Then use standard html to create the content. Pre-made box templates are included in the kit. Easily copy/paste the raw html into you page. Then simply add your content to the box.
It is fun to open and close the boxes. With this tool a webmaster can engage their audience much faster and for a longer time. Hide boring content and make it look cool at the same time. Give your visitors a sense of fun. They want to see the hidden content. And they will explore to see what treasures are underneath.
With the growing mobile device usage long webpages tend to be too much information for the user. With an accordion box a webpage can be shortened to something a mobile user can quickly scan.
Did I mention that Accordion Boxes are mobile responsive? You bet, that is what sets these boxes apart from others. You still have to layout your content with mobile in mind.
tag or the very bottom of the page. For experienced HTML coders you just download this code to your desktop then upload it to your javascript folder.
<script src="jquery-1.11.0.min.js">
</script>
<script src="accordion-boxes.js"></script>
Make sure you path this file in correctly. If you put this is a directory other than the root you need to point to it.
The <a href="#"> tag is important. It uses a style rule 'display:block' which turns the whole button into a link, (not just the text).
I used the <h2> headline for my box title, so that mobile users have a large tappable area. The search engines love that.
</a>
</div>
<div class="accordion-panel">
As you can see from this page you can squeeze a lot of information into a small space. However the idea is not to put too much info in the panel boxes. Instead use another accordion box.
Note: this code chunk should be followed by your 'box title' then another 'box middle' code chunk. Followed by your main content for that panel.
You need 2 javascript files and this html code to make a 2 button stack.
jquery-1.11.0.min.js
accordion.js
Basic HTML code structure:
<div class="accordion">
<div class="accordion-title">
<a href="#"><h2>Title</h2></a></div>
<div class="accordion-panel">
Replace this with your content.
</div>
<div class="accordion-title"<a href="#"><h2>Title</h2></a></div>
<div class="accordion-panel">
Replace this with your content.
</div>
</div>
The action, when clicked on uses the 'slideToggle' function in jQuery. The accordion.js is a simple program that controls the show/hide function of the panel. The actual code analysis is beyond the scope of this article. Let's just say it provides the animation of the accordion box.
A-Boxes allow for styling the title box and content panels. You could stack as many as you want but only need to add the javascript files once per page. You can have just one item or many or many of them.
To use on a Solo Build It BB2 page, use a 'reusable block' to hold the html code chunks. You will need 4 reusable blocks. For uploading to your site, simply copy and paste the HTML and CSS code (shown below) into your page. All detailed in the Made Easy Tutorial.
All button and box styles are found in the accordion-boxes.css file included in the kit. The code is well commented inside the included ebook. Best practices for modifying the code are reviewed.
btn-inner must be used in conjunction with accordion-panel class.
If you put an icon in your title box be aware that size does matter.
Inside the tutorial we explain how to modify change the code in the .css file. We also show how to get 'twemoji' icons into your page.
I used a light grey box with rounded corners for the control box. So my code looks like this: <div class="accordion-title accordion-box">
I added this code to my css file. Then added the CSS tag to my source code. To add this to a webpage only you need to include the source code in between the <style>...</style> tags in the head section of the page.
You can make up any style rules you like and add them to the 'title' or panel box
Step by step tutorial to animate show / hide content boxes.
$29.97
Our Price $9.97
That's it, thanks for reading.
Tim
Need support or have a question? Drop me an email on the contact-us page.
Home : Website Design : accordion boxes