Simple Accordion in jQuery, Accordion in jQuery

I'm sharing simple jQuery Accordion which can be used anywhere in your project where you want to be accordian.
<html>
<head>
<title>Menu Slide Accordian</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script>
jQuery(document).ready(function(){
jQuery('.child-trigger').click(function() {
jQuery(this).parent().siblings('.menu-item-has-children').find('.child-trigger').removeClass('activate');
jQuery(this).parent().siblings('.menu-item-has-children').find('ul.sub-menu').slideUp(250);
jQuery(this).next('ul.sub-menu').slideToggle(250);
jQuery(this).next('ul.sub-menu').children('.menu-item-has-children').find('ul.sub-menu').slideUp(250);
jQuery(this).next('ul.sub-menu').children('.menu-item-has-children').find('.child-trigger').removeClass('activate');
jQuery(this).toggleClass('activate');
return false;
});
});
</script>
<style>
ul,li{
padding:0;
margin:0;
}
.menuSlide {
background: #0aa899;
height: 100%;
max-width: 440px;
width:100%;
top: 0;
position: fixed;
overflow: scroll;
overflow-x: hidden;
overflow-y: auto;
max-height: 100%;
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
transition: all .4s ease;
}
ul.sub-menu{
display:none;
}
.menuSlide li {
display: block;
padding-right: 0;
border-bottom: 1px solid rgba(255, 255, 255, .35);
position: relative;
}
.menuSlide li a {
font-size: 16px;
padding: 20px 10px 20px 40px;
line-height: 20px;
display: block;
color: #ffffff;
text-transform: uppercase;
text-decoration:none;
}
.menuSlide ul.sub-menu {
background-color: rgba(10, 156, 142, 0.63);
}
.menuSlide .child-trigger {
display: block;
cursor: pointer;
position: absolute;
top: 0;
right: 0;
width: 55px;
min-width: 55px;
height: 60px;
padding: 0;
border-left: 1px solid rgba(255, 255, 255, .20);
}
.child-trigger i,
.child-trigger i:after {
width: 10px;
height: 1px;
background-color: #fff;
display: block;
}
.child-trigger i {
position: relative;
top: 50%;
margin: 0 auto;
}
.child-trigger i:after {
position: absolute;
content: '';
}
.child-trigger i:after {
-webkit-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
transform: rotate(-90deg);
}
.child-trigger.activate i:after {
-webkit-transform: rotate(-180deg);
-ms-transform: rotate(-180deg);
transform: rotate(-180deg);
}
</style>
</head>
<body>
<div class="menuSlide">
<ul>
<li class="menu-item"><a href="">Home</a></li>
<li class="menu-item"><a href="">Portfolio</a></li>
<li class="menu-item menu-item-has-children"><a href="#">Slide1</a>
<div class="child-trigger"><i></i></div>
<ul class="sub-menu" style="">
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
</ul>
</li>
<li class="menu-item menu-item-has-children"><a href="#">Slide2</a>
<div class="child-trigger"><i></i></div>
<ul class="sub-menu" style="">
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
</ul>
</li>
<li class="menu-item menu-item-has-children"><a href="#">Slide2</a>
<div class="child-trigger"><i></i></div>
<ul class="sub-menu" style="">
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
<li><a href="">Sub-slide</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>

Whats up! I just would like to give a huge thumbs up for the nice data you have here on this post. I will probably be coming back to your blog for extra soon. 루피카지노

I’ll immediately grab your rss as I can’t find your e-mail subscription link or e-newsletter service. Do you’ve any? Please let me know in order that I could subscribe. Thanks. 텐텐벳

Excellent post however I was wanting to know if you could write a litte more on this topic? I’d be very thankful if you could elaborate a little bit more. Thank you! 지니카지노

Thanks for another informative website. The place else may I am getting that type of info written in such an ideal means? I’ve a undertaking that I’m just now operating on, and I have been on the glance out for such info. 라바카지노

Of course, what a magnificent site and illuminating posts, I will bookmark your website.Have an awsome day! 짱구카지노

Hi there! I could have sworn I’ve been to this web site before butafter looking at a few of the posts I realized it’s new to me.Anyhow, I’m definitely pleased I found it and I’ll be book-marking it and checkingback often! 티비착

Hi there, after reading this remarkable pieceof writing i am also glad to share my knowledge here with friends. 여기여

Hey! This is my first comment here so I just wanted to give a quick shoutout and say I really enjoy reading your blog posts. Can you recommend any other blogs. 티비위키

It’s actually very complex in this full of activity life to listen news on Television, thus I simplyuse the web for that purpose, and take the most up-to-dateinformation. 주소모아

Excellent blog you’ve got here.. It?s digficult to find high qualitywriting like yours these days. I seriously appreciate individuals like you!Take care!! 링크사랑

Hey there, You’ve done a fantastic job. I’ll definitely digg it and personally suggest to my friends.I’m confident they will be benefited from this site. 툰코

I every time used to read piece of writing in news papers but now as I ama user of net thus from now I am using net for articlesor reviews, thanks to web. 마나토끼

As soon as I found this internet site I went on reddit to share some of the love with them. 누누티비

As soon as I found this internet site I went on reddit to share some of the love with them. 누누티비

These are actually impressive ideas in about blogging.You have touched some good factors here.Any way keep up wrinting. 온카123
Please rotate your device
We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site