How To Create A Sexy Vertical Sliding Panel Using jQuery And CSS3
More and more we see people using horizontal sliding panels on their websites. And they usually look very nice! Some will put a contact or login form in there, others will put some information about them and their website, or even things like a tag cloud or social networking buttons.
Horizontal sliding panels are great for many situations, but like everything else, they’re not always ideal. It depends on the project. To see what I mean by ‘horizontal sliding panel‘, go have a look at my other site Design-Newz, and click on the ‘want more‘ button that’s on the right above the navigation bar.
The Plan
So, what about a vertical sliding panel that would act as some sort of drawer instead of the usual top horizontal sliding panel that pushes everything else down when it opens? While thinking of alternatives to the usual horizontal panels, I thought it would be nice to create something that works in a similar way, but that is a bit more flexible.
Here’s what I had in mind (click to enlarge or check below the image for working demos):
First we’ll create the markup, then the CSS and then we’ll use jQuery to open and close our vertical sliding panel. I created 3 different demos:
- Vertical sliding panel and open/close trigger button on the left with absolute positioning
- Vertical sliding panel and open/close trigger button on the right with absolute positioning
- Vertical sliding panel and open/close trigger button on the left with fixed positioning
Here are the files we will need for this tutorial:
- index.html
- style.css
- jQuery library
- images
1- Markup
Let’s start with the head of our document. We need to declare a doctype, write a title and link to our CSS file and to the jQuery library (we’ll let Google host the jQuery file). Later on we’ll come back to this and write our jQuery, but let’ start with just this.
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vertical Sliding Info Panel With jQuery</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
</head>
</html>
Then, inside the body of our document, we’ll create a div and give it an ID of ‘container‘. This div will hold all of our main content (Lorem Ipsum in this case) but not our sliding panel. Inside this div we’ll put a H1, H2, another div and some paragraphs. Here’s the markup:
<div id="container">
<h1>Vertical Sliding Info Panel With jQuery</h1>
<h2>The Sliding Panel And Trigger Button On The Left Have Absolute Positioning</h2>
<p>This is an example of simple page that's centered and has a vertical sliding panel on the far left (try it! click on the 'infos' tab that's on the left!). We used jQuery to create this sliding panel (and CSS3 rounded corners because it looks cool)</p>
<p><a href="http://spyrestudios.com/how-to-create-a-sexy-vertical-sliding-panel-using-jquery-and-css3/" title="How To Create A Vertical Info Panel With jQuery">Click here to return to the tutorial on SpyreStudios</a></p>
<div class="content">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut eget eros libero. Fusce tempus quam sit amet erat mollis a fermentum nibh imperdiet. Fusce iaculis sapien in turpis aliquet porta. Donec tincidunt gravida tortor, vel dignissim augue convallis sit amet. Aliquam auctor ornare accumsan. Cras convallis elit tincidunt arcu semper egestas. Mauris interdum fringilla nisi. Cras a dapibus lectus. Praesent blandit ullamcorper ornare. Nam hendrerit sollicitudin urna non ultricies. Phasellus condimentum auctor risus, at accumsan tellus tempor vel. Nunc mattis eleifend dolor at adipiscing.</p>
</div>
</div>
Now after this ‘container div‘ we’ll write the markup for our vertical sliding panel and trigger button. I put some paragraphs, H3 tags and some links and unordered lists in the sliding panel.
<div class="panel">
<h3>Sliding Panel</h3>
<p>Here's our sliding panel/drawer made using jQuery with the toggle function and some CSS3 for the rounded corners</p>
<p>This panel could also be placed on the right. This could be particularly useful if, <a href="http://spyrestudios.com" title="SpyreStudios">like me</a>, you have a left-aligned website layout.</p>
<h3>A Little Something About Me</h3>
<img class="right" src="images/jon_image.jpg" alt="Jon Phillips" />
<p>My name's Jon, I'm a freelance designer, blogger, musician. I run SpyreStudios and I specialize in WordPress blogs, CSS, XHTML and PHP</p>
<div style="clear:both;"></div>
<div class="columns">
<div class="colleft">
<h3>Navigation</h3>
<ul>
<li><a href="http://spyrestudios.com/" title="home">Home</a></li>
<li><a href="http://spyrestudios.com/about/" title="about">About</a></li>
<li><a href="http://spyrestudios.com/portfolio/" title="portfolio">Portfolio</a></li>
<li><a href="http://spyrestudios.com/contact/" title="contact">Contact</a></li>
<li><a href="http://spyrestudios.com" title="blog">Blog</a></li>
</ul>
</div>
<div class="colright">
<h3>Social Stuff</h3>
<ul>
<li><a href="http://twitter.com/jophillips" title="Twitter">Twitter</a></li>
<li><a href="http://designbump.com/user/147" title="DesignBump">DesignBump</a></li>
<li><a href="http://digg.com/users/jophillips" title="Digg">Digg</a></li>
<li><a href="http://delicious.com/jon.phillips" title="Del.Icio.Us">Del.Icio.Us</a></li>
<li><a href="http://designmoo.com/users/jonphillips" title="DesignMoo">DesignMoo</a></li>
</ul>
</div>
</div>
<div style="clear:both;"></div>
</div>
<a class="trigger" href="#">infos</a>
And then we can end our document with the closing body and html tags. Now on to the CSS! :)
2- CSS
As you’ll see the CSS is pretty straight forward. I just added some CSS3 rounded corners to the main container div and to the trigger button and sliding panel. You will also notice that the trigger button and panel has absolute positioning to the left. This will place the button and panel on the left edge of the browser window.
body {
background:#1a1a1a;
text-align:left;
color:#666;
width:700px;
font-size:14px;
font-family:georgia, 'time new romans', serif;
margin:0 auto;
padding:0;
}
a:focus {
outline: none;
}
h1 {
font-size: 34px;
font-family: verdana, helvetica, arial, sans-serif;
letter-spacing:-2px;
color:#9FC54E;
font-weight:700;
padding:20px 0 0;
}
h2 {
font-size: 24px;
font-family: verdana, helvetica, arial, sans-serif;
color:#444444;
font-weight: 400;
padding: 0 0 10px;
}
h3 {
font-size:14px;
font-family:verdana, helvetica, arial, sans-serif;
letter-spacing:-1px;
color:#fff;
font-weight: 700;
text-transform:uppercase;
margin:0;
padding:8px 0 8px 0;
}
img{
float: right;
margin: 3px 3px 6px 8px;
padding: 5px;
background: #222222;
border: 1px solid #333333;
}
p {
color:#cccccc;
line-height:22px;
padding: 0 0 10px;
margin: 20px 0 20px 0;
}
img {
border:none;
}
#container {
clear: both;
margin: 0;
padding: 0;
}
#container a{
float: right;
background: #9FC54E;
border: 1px solid #9FC54E;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomleft: 20px;
-webkit-border-bottom-left-radius: 20px;
text-decoration: none;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px;
font-weight: 700;
}
#container a:hover{
float: right;
background: #a0a0a0;
border: 1px solid #cccccc;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomleft: 20px;
-webkit-border-bottom-left-radius: 20px;
text-decoration: none;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px;
font-weight: 700;
}
.content {
font-style:normal;
font-family:helvetica, arial, verdana, sans-serif;
color:#ffffff;
background:#333333;
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomleft: 20px;
-webkit-border-bottom-left-radius: 20px;
margin: 30px 0 50px;
padding: 15px 0;
}
.content p {
margin: 10px 0;
padding: 15px 20px;
}
.panel {
position: absolute;
top: 50px;
left: 0;
display: none;
background: #000000;
border:1px solid #111111;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
width: 330px;
height: auto;
padding: 30px 30px 30px 130px;
filter: alpha(opacity=85);
opacity: .85;
}
.panel p{
margin: 0 0 15px 0;
padding: 0;
color: #cccccc;
}
.panel a, .panel a:visited{
margin: 0;
padding: 0;
color: #9FC54E;
text-decoration: none;
border-bottom: 1px solid #9FC54E;
}
.panel a:hover, .panel a:visited:hover{
margin: 0;
padding: 0;
color: #ffffff;
text-decoration: none;
border-bottom: 1px solid #ffffff;
}
a.trigger{
position: absolute;
text-decoration: none;
top: 80px; left: 0;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px 40px 20px 15px;
font-weight: 700;
background:#333333 url(images/plus.png) 85% 55% no-repeat;
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-bottomleft: 0px;
-webkit-border-bottom-left-radius: 0px;
display: block;
}
a.trigger:hover{
position: absolute;
text-decoration: none;
top: 80px; left: 0;
font-size: 16px;
letter-spacing:-1px;
font-family: verdana, helvetica, arial, sans-serif;
color:#fff;
padding: 20px 40px 20px 20px;
font-weight: 700;
background:#222222 url(images/plus.png) 85% 55% no-repeat;
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
-moz-border-radius-bottomleft: 0px;
-webkit-border-bottom-left-radius: 0px;
display: block;
}
a.active.trigger {
background:#222222 url(images/minus.png) 85% 55% no-repeat;
}
.columns{
clear: both;
width: 330px;
padding: 0 0 20px 0;
line-height: 22px;
}
.colleft{
float: left;
width: 130px;
line-height: 22px;
}
.colright{
float: right;
width: 130px;
line-height: 22px;
}
ul{
padding: 0;
margin: 0;
list-style-type: none;
}
ul li{
padding: 0;
margin: 0;
list-style-type: none;
}
If you would like to place the trigger button and sliding panel on the right of the window, simply edit the a.trigger and .panel and switch ‘left‘ for ‘right‘. From this:
a.trigger{
position: absolute;
top: 80px; left: 0;
}
.panel {
position: absolute;
top: 50px; left: 0;
}
To this:
a.trigger{
position: absolute;
top: 80px; right: 0;
}
.panel {
position: absolute;
top: 50px; right: 0;
}
And also make sure to edit the rounded corners from this:
border:1px solid #444444;
-moz-border-radius-topright: 20px;
-webkit-border-top-right-radius: 20px;
-moz-border-radius-bottomright: 20px;
-webkit-border-bottom-right-radius: 20px;
To this:
border:1px solid #444444;
-moz-border-radius-topleft: 20px;
-webkit-border-top-left-radius: 20px;
-moz-border-radius-bottomleft: 20px;
-webkit-border-bottom-left-radius: 20px;
Doing this will place the trigger button and sliding panel to the right and place the rounded corners on the left instead of the right.
If you would like to get the trigger button and sliding panel to always stay visible when you scroll up and down, change the absolute positioning to fixed positioning, like this:
a.trigger{
position: fixed;
top: 80px; left: 0;
}
.panel {
position: fixed;
top: 50px; left: 0;
}
Oh and if you’d like to remove the transparency of the sliding panel, simply remove or edit this part of the CSS:
filter: alpha(opacity=85);
opacity: .85;
3- jQuery
Now all that’s left to do is write our jQuery, cause if we don’t we’ll just have a useless trigger button and no sliding panel :)
Since we already wrote the markup we know that the button has a class of ‘.trigger‘ and the sliding panel has a class of ‘.panel‘. This code will go right before the closing head tag in the header section. Here it is:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Vertical Sliding Info Panel With jQuery</title>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".trigger").click(function(){
$(".panel").toggle("fast");
$(this).toggleClass("active");
return false;
});
});
</script>
</head>
</html>
This will tell the browser to open and close (toggle) the panel when the trigger button is clicked. It’ll also give a class of ‘active‘ to our trigger button. This will make the green plus sign switch to a red minus sign.
That was pretty easy, eh?
Download And Demos
Here are the 3 demos again:
- Vertical sliding panel and open/close trigger button on the left with absolute positioning
- Vertical sliding panel and open/close trigger button on the right with absolute positioning
- Vertical sliding panel and open/close trigger button on the left with fixed positioning
You can also download a zip file that contains all 3 demos
(downloaded 4504 times already!)
I hope you enjoyed this tutorial! Please let me know if you have any questions and drop me a line if you end up using it (or a variation) on your own site, I’d love to see it! :)
Note: I haven’t tested the demos in IE6 so they may not work as expected. (which is kind of expected from IE6)





Are you a talented designer who enjoys writing and blogging? If you are, we want to hear from you! We're currently looking for contributors!
jump to the comment form ↓
August 27th, 2009
Neat stuff mate, absolutely brilliant!
The third one (on the left with fixed positioning) is just fab…
Thnx for sharing!
August 27th, 2009
Amazing and impressive, thanks for the tutorial
August 27th, 2009
That is the best jQuery idea I’ve seen lately! The possibilities seem endless. I will definitely use a variation of this on my upcoming website redesign. Thanks, Jon!
August 27th, 2009
Very nice, thanks for the tutorial.
August 27th, 2009
Thanks for this tutorial. Bookmarked this so I can come back and try it out for a new website. Thanks again.
August 27th, 2009
Hey Jon,
Well done for the tutorial. Its great for young guns to get into. Keep them coming.
August 27th, 2009
Great tutorial, got to love that jQuery! There is the issue of browser support with CSS3 though, always a pain! Nevertheless, they all look great in mine, thanks!
August 27th, 2009
CSS 3 rounded corner only works on Firefox, how to get this on IE and Opera?
August 27th, 2009
Love the idea, do you have any tips on integrating this into a wordpress site?
August 27th, 2009
This is awesome enough, I have added this article on to my website that is Developer Snippets – http://www.developersnippets.c.....th-jquery/, this will help most of the developers and I would like to thank you for your valuable effort on this.
Thanks,
Vivek
[http://www.developersnippets.com]
August 27th, 2009
i must try today for my better experience and get some extra skills regarding Jquery. thanks
August 28th, 2009
Thank you. I really may try this on my new website… Clean solution…
August 28th, 2009
Very nice, Thanks for this tutorial, very helpful :)
August 28th, 2009
Nice tutorial ! I’ll add this to the bookmarks!
August 28th, 2009
Awesome. I’ve been looking for something like this for ages. CSS3 though, bit early still?
August 28th, 2009
Nice idea, I’ve been considering options on how to increase our contact form accessibility, seems like a possible solution. Thanks for the tip, I’ve bookmarked the post for future reference.
August 28th, 2009
Thanks for this great solution.
Other than that i would like to ask how can I add two slide panels into one page and use them like a tab menu. Actually, I managed it by dublicating the code and the css ids/ classes. The only problem is if one clicks on the first panel and then the another one, the previous one doesnt disappear, rather; it remains open. Is there any quick way out to fix this. All I want is if someone clicks on any links in the page or ,as in my example, on the second slide panel, the previously opened panel needs to be take its original position and hide..
Thanks.
August 28th, 2009
@all: thanks a lot for all the great comments! I’m happy you found this tut useful! :)
@Ryan: Thanks! Yep, the rounded corners won’t work in all browsers, but the design would still be very similar. This could also be done using images for the rounded corners. You could create a rounded box and make the top and bottom images as background images inside divs and you’d have rounded corners. Though for the trouble it can give you to do that, I’d just make the rounded corners in CSS3, and let people who use IE see the square corners. :)
@Aaron: Thanks! Sure, well, provided your current style.css doesn’t contain any of the classes and ids I used to create my sliding panel, you could simply copy-paste the appropriate CSS inside your style.css file, and then in your header.php (since it appears on all pages usually) you could add the whole ‘div class=”panel’ right below the body tag. Should work ok :) Drop me a line via my contact form if you run into any problems.
@Alex: I don’t think it’s too early. Safari and Firefox already play nice with CSS3. People should upgrade their old and obsolete IE6, that would help hehe
@Webguru: Good question! To be able to duplicate the panel and trigger button you’d need to edit the JS code a bit (and the CSS too I’m pretty sure). A variation of this menu (http://www.noupe.com/tutorial/.....y-css.html) could work very well, you’d just need to edit the CSS to get the menu to a left/right/fixed positioning I think. Lemme look into it and I’ll post a solution here over the week-end. :)
August 29th, 2009
That looks great. Thanks for posting. You’ve inspired me to upgrade my splash page to something a bit more pleasing on the eye.
August 31st, 2009
Great tips, very useful for my next websites.
August 31st, 2009
Apparently you focus on Wordpress development so I would like to know how to integrate this into Wordpress? Would this code need to go in every page of an HTML document where panel s to be featured? Thank you.
August 31st, 2009
@Jon Phillips That’s great news. I am looking forward to it.
Thanks for your help.
September 1st, 2009
I’m definitely going to use this in the near future. Thank you for sharing this with the public.
September 1st, 2009
Wondering if this effects SEO in any way.
Thanks
September 5th, 2009
Hi, very nice work. I couldnt resist and I did a script that uses this idea plus the jquery ui slider. Its a jquery style slider where you can use sliders to apply RGB or font size values to HTML elements. You can try it out here and download the source code, and of course use like you want: http://tympanus.net/codrops/20.....th-jquery/
September 13th, 2009
Great !! I was looking for this. Thanks
September 14th, 2009
Greattt, thanksss !!!!
September 21st, 2009
Great tutorial Thanks!! XD
September 22nd, 2009
Fantastic! I’ve been working on something similar for a while now (with panels on both sides) but this is more elegant than my attempt.
Do you think it would be fairly easy to move the trigger tab along with the sliding panel? In other words, after the trigger brings the hidden panel to the forefront, do you think the trigger could move with it, appearing as a tab attached to the top right (if using the left panel) of the sliding panel?
Thanks for the article!
September 25th, 2009
Thanks for the great tutorial. Not only functional but designed well at that.
September 29th, 2009
hi all
i was hoping the version of the bottom of the page lol anyway nice tricks
September 30th, 2009
How would I go about making this panel automatically load once a page loads, and a user can choose to minimize it back to the side?
Any help would be greatly appreciated! Thanks!
October 3rd, 2009
Hi,
Thank you for giving such a feature but I need a mouse over event for this where on roll out from the pane1 the tab must be closed…can you help me with this…
October 4th, 2009
Nice tut im using it now with 3 tabs under neath each other
but i want to change the jquery code to make the 2 other slides slide back when 1 is clicked so it prevents you from having the tabs open at the same time
Nonetheless great tutorial
October 6th, 2009
Really useful. I’ll need to find a way to try it on a new website!
October 10th, 2009
How to use with regular link or image link inside the page content etc as a trigger?
like dynamic drive anylink :)
October 14th, 2009
Hi
Great Work!!!! Like Jason I’d also like to know how this coul dbe triggered to open/slide on page load. Any ideas?
Glennyboy
October 14th, 2009
Ah, worked it out….
$(document).ready(function(){
$(window).load(function() {
$(“.panel”).toggle(“fast”);
$(this).toggleClass(“active”);
return false;
});
});
October 19th, 2009
Hello –
Anyone know how to use multiples of this on the same page? I cannot figure out how to keep them from stacking on each other.
Thanks!
October 19th, 2009
@Justin – the a.trigger and .panel css should be duplicated (ie: a.trigger2 & .panel2) and then adjust the position’s top: px; and left/right px.
October 20th, 2009
That’s a lot of CSS, but yeah, guess that’s how it would have to be done.
Thanks!
October 22nd, 2009
I think I and webGuru has the same problem. Are there any progress in the requesT? Would like to use this in my personal website. Im currently transforming my blog into a portoflio site. Thanks a lot mate!
October 22nd, 2009
Ok, so here it is. I wanted to close the other when I open 1 link. And yes I have to duplicate the css and javascript..
Here’s a sample where I create 3 links: http://www.codewalkz.com/zone
JAVA:
$(document).ready(function(){
$(“.trigger”).click(function(){
$(“.panel”).toggle(“slow”);
$(“.panel3″).hide(“slow”);
$(“.panel1″).hide(“slow”);
return false;
});
});
$(document).ready(function(){
$(“.trigger1″).click(function(){
$(“.panel1″).toggle(“slow”);
$(“.panel”).hide(“slow”);
$(“.panel3″).hide(“slow”);
return false;
});
});
$(document).ready(function(){
$(“.trigger2″).click(function(){
$(“.panel3″).toggle(“slow”);
$(“.panel”).hide(“slow”);
$(“.panel1″).hide(“slow”);
return false;
});
});
October 23rd, 2009
This was a great tut… was very easy to follow :)
I am wondering if you might be able to help… I am using the slide in panel to hold a login control… so far so good.. however if the user enters the wrong password, is there a way to keep the panel open and only close it if it passes validation? I am extremely new to JQuery and CSS.
November 2nd, 2009
oooh i’m loving it. Thanks for sharing this!
November 17th, 2009
Hello there,
just wanted to thank you for this great tutorial :D
I’ve used it on this website:
http://www.dizajn.vg
Keep up the good work :) we very much appriciate it
November 17th, 2009
Very nice effect, Jon.
One observation: It seems to me that your description of the technique is backwards, since it says “vertical sliding panel”. By that, I would assume the panel “slides vertically” (which would be “top to bottom”, as is the case on the design-newz website). In fact, this panel slides “horizontally”, with a slight vertical effect, as if it’s growing out of the little button that’s clicked. And likewise, the panel on Design Newz slides “vertically”, although you describe it as a “horizontal sliding panel”.
I think what you meant to say is “Vertically-positioned sliding panel” (on this tutorial) vs. “Horizontally positioned sliding panel” (on Design Newz).
Maybe I’m wrong, but that seems to be a more fitting way to describe what’s done here.
Thanks for a nice effect, though!
November 23rd, 2009
very nice tutorial
iam using a small 12.1 and my maximum screen resolution in 800 on 600 so in the fixed position i cant see all the menu …
November 30th, 2009
I’m using this as tabs on a catalog. http://allenamatech.com/catalog/slide.html.
I need it to be in the center of the page. I put it in a table but now the images are being bounced around. Is this not possible?
December 24th, 2009
@ianmayman, I think it would depend on your theme but in general, you just pop this puppy into index.php and let it load as default for every post. You can then add it to page.php or any of the custom templates you create. I think that’s what you’re asking.
Great tut, easy to understand and with a free download at that! Thanks!
January 3rd, 2010
nice tut
January 12th, 2010
nice slide panel. i have a small problem.
the panel is open if i load the page the first time. and if i click the button the panel closed. i cant find my error.
January 12th, 2010
ok i fix it. here is the code:
jQuery().ready(function(){
$(“.slidePanel”).toggle();
$(“#trigger”).click(function(){
$(“.slidePanel”).toggle(“slow”);
$(this).toggleClass(“active”);
return false;
});
i add $(“.slidePanel”).toggle(); at first.
January 14th, 2010
mhh i have an big problem , all of this content is behind an picture on my web site but i use for this script: position: absolute; and for this image position: relative;
Thank you very much!
January 14th, 2010
ok, is solved with z-index: 999; , very good script!!!
January 20th, 2010
thank you for this tutorial..
January 21st, 2010
This is an incredible post, I very much thank you for that. The simplest tutorial I choose :)
January 31st, 2010
Thanks man, great effort and work.
February 2nd, 2010
Wonderful demo and best at all is that it work smooth in my Opera browser :)
February 2nd, 2010
Works okay in IE6 too!
February 2nd, 2010
I just discovered this tutorial and would like to thank you. I have seen this effect and have been wanting to incorporate it into my own site. Thanks so much.
February 3rd, 2010
Hi,
I want to have 3, 4, 5 or more links to toggle the panel. If the page is to be dynamic (with PHP for instance) it´s hard to duplicate the CSS and the javascript based on how many links i´ll have.
So, is there a way to do this by altering the javascript code or any other way ?
It´s almost the same question as Webguru (August 28th, 2009) and cOdewalkz (October 22nd, 2009) but with the option to have how many links i want to toggle the slide panel.
Thanks in advance. Great script by the way. ;)
February 3rd, 2010
hay again,
i really hated ie, ya sure no round corners even transparency is gone, also the effect is appear not sliding it’s ie7, searching for a fix…
Best Regards
February 4th, 2010
very very nice….thanks a lot!!!
February 6th, 2010
Very nice. I think I will use smth like this in my next project. Thnx
February 7th, 2010
…Simply delicious !
February 8th, 2010
Sorry but can you give some feedback on my question, please ?
QUOTE:
“I want to have 3, 4, 5 or more links to toggle the panel. If the page is to be dynamic (with PHP for instance) it´s hard to duplicate the CSS and the javascript based on how many links i´ll have.
So, is there a way to do this by altering the javascript code or any other way ?
It´s almost the same question as Webguru (August 28th, 2009) and cOdewalkz (October 22nd, 2009) but with the option to have how many links i want to toggle the slide panel.”
February 8th, 2010
@Pedro: Sorry for the late response. Unfortunately at the moment I can’t offer support for this. It’s provided as-is. I may be able to work on it more soon, but at the moment my schedule is very full.
If someone wants to help with it, provide fixes and improvements, or even turn this into a WordPress plugin or something like that (or if you got other ideas), drop me an email. :)
February 8th, 2010
Ok. Thanks. If you turn up with a solution it would be appreciated.
Anyway,if someone here knows how to do it can you please post it ?
In some searches on the web i found some similarities with this script but can´t put it to work.
I think it could be acomplished by adding a REL attribute to the DIV (if it´s possible) like the following:
and then on the script:
$(“.panel[rel^='number']“).toggle(“fast”);
The ideia is to call a DIV panel per link. Each link calls it´s own panel.
ANYONE ??!!!
thanks.
February 8th, 2010
Ok. Thanks. If you turn up with a solution it would be appreciated.
Anyway,if someone here knows how to do it can you please post it ?
In some searches on the web i found some similarities with this script but can´t put it to work.
I think it could be acomplished by adding a REL attribute to the DIV (if it´s possible) like the following:
div class=”panel” rel=”number[1]”
and then on the script:
$(“.panel[rel^='number']“).toggle(“fast”);
The ideia is to call a DIV panel per link. Each link calls it´s own panel.
ANYONE ??!!!
thanks.
February 9th, 2010
really!!! very good
thanks for sharing this i will use it my upcoming website
cheers!!
February 13th, 2010
Hi, is a really wanna thank you for your excellent article, I have a problem Im trying to have more butons to show the slide, in the javascript y put:
$(document).ready(function(){
$(“.trigger”).click(function(){
$(“.panel”).toggle(“fast”);
$(this).toggleClass(“active”);
return false;
});
});
$(document).ready(function(){
$(“.triggeruno”).click(function(){
$(“.paneluno”).toggle(“fast”);
$(this).toggleClass(“active”);
return false;
});
});
and in the css I copy/paste the same of trigger y panel to triggeruno y paneluno
February 13th, 2010
Hi, is a really wanna thank you for your excellent article, I have a problem Im trying to have more butons to show the slide, in the javascript y put:
$(document).ready(function(){
$(”.trigger”).click(function(){
$(”.panel”).toggle(”fast”);
$(this).toggleClass(”active”);
return false;
});
});
$(document).ready(function(){
$(”.triggeruno”).click(function(){
$(”.paneluno”).toggle(”fast”);
$(this).toggleClass(”active”);
return false;
});
});
and in the css I copy/paste the same of trigger y panel to triggeruno y paneluno
but if click in the second text with triggeruno, the slide don’t appear, only if i clicked in the firt text of trigger.
Anybody has a idea??, thanks a lot for your time
February 14th, 2010
Fantastic article – I searched everwhere before finding this and it’s exacly what I was needing. Thanks for sharing.
Really easy to integrate..now…let’s see if I can get it pulling our Twitter feed!
February 21st, 2010
I have a probleme to set the panel to the right site of the window. I change the CSS to this:
.panel {
position: absolute;
top: 50px; right: 0;
}
It works fine. But if i add the doctype:
then the panel appears on the left side.
Can someone help me please?
February 21st, 2010
Just wanted to let you know how much I appreciate you making this available! This is exactly what I needed. Between studying the code and reading the comments from various posters, I was able to implement this on my WordPress theme. Thanks again!
February 21st, 2010
just out of curiosity, could this be edited to work horizontally as well? i love the concept, but have a horizontal site designed and this could be really awesome with it.
February 24th, 2010
Exactly what I need it!!! I am going to implement it on my website with your permission!!
Thank you very much!
February 24th, 2010
By the way! Do not worry about Internet Explorer… I don’t support Internet Explorer AT ALL! They deserve it due to their security pitfalls and horrible JS and CSS engines!
Thanks again!
February 25th, 2010
Hi Jon,
the tutorial is very easy to follow and I’m planning to use your panel for a client of mine (with your permission).
Just one comment on IE (tested in IE8 till now): to see the icon change from the green + to the red – in the CSS you have to write “a.trigger.active” instead of “a.active.trigger”.
There are also some little issues with transparency: I’m gonna try some hacking and then I’ll let you know if you are interested.
Thanks!
February 26th, 2010
Hi,
Great tutorial, thanks, I was using something similar to .append() a div to a floating area, but adding content to it wa a nightmare due to some sort of whitespace issue.
This works a treat tho. Would be quite nice if there was a stripped down “clean” demo, with just the functionality rathern than super css.
Thanks
Shaun
March 2nd, 2010
hi hon! really great tutorial! i’m a webdesign rookie, and i used the panel as a menu, along with some little adjustments, on my first and own website! checkt it out: http://www.arneuebel.com!
thanks a lot and best greetings from germany!!
March 2nd, 2010
Hi everyone! First of all, thanks a lot for all your comments, much appreciated!
I’m sorry I’m not able to provide support for this sliding panel. I thought I’d mention it here, especially since I’m receiving quite a lot of emails with questions on how to do this and that. Unfortunately I cannot help everyone and reply to all your questions. (I wish I could though)
BUT, I’m working on another tutorial which will include fixes and tips to address the most frequent questions I’m getting. Stay tuned! :)
March 3rd, 2010
Hi Jon,
I solved the little opacity issue: in IE (I tested 7 and 8) the sliding box had solid color instead of some transparency. It is probably due to the toggle() in jQuery. My workaround was:
$(document).ready(function()
{
$(“.trigger”).click(function()
{
//$(“.panel”).toggle(“fast”);
$(this).toggleClass(“active”);
if ($(this).hasClass(“active”)){
$(“.panel”).css(“display”,”block”);
}
else
{
$(“.panel”).css(“display”,”none”);
}
return false;
}
);
}
);
It works fine both in IE 7 and 8 (and FF of course!). I hope this helps!
March 12th, 2010
Very nice and useful tutorials for web designers,
Thanks for posting.
Who Linked To This Post?
Share your thoughts, leave a comment!
(get your own gravatar)