I'm back 🙂
Alright, in this tutorial, I will show you how to make a slider panel that uses jQuery, CSS, and some HTML. Wanna see the demo? Of course you do, well here it is! http://gctest2010.formyjob.net/slider2-h2.htm
First: Start with the jQuery
2. Time for some CSS!
3. Now, for some HTML
That's it!
Tips!!!
~~ If you wanna change the background of the slider, find
in the css and change the hexadecimal value
Alright, in this tutorial, I will show you how to make a slider panel that uses jQuery, CSS, and some HTML. Wanna see the demo? Of course you do, well here it is! http://gctest2010.formyjob.net/slider2-h2.htm
First: Start with the jQuery
Code:
<script type="text/javascript" src="http://graphiccentral.bravehost.com/slider.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".btn-slide").click(function(){
$("#panel").slideToggle("slow");
$(this).toggleClass("active"); return false;
});
});
</script>
2. Time for some CSS!
Code:
<style type="text/css">
body {
margin: 0 auto;
padding: 0;
width: 570px;
font: 75%/120% Arial, Helvetica, sans-serif;
}
a:focus {
outline: none;
}
#panel {
background: #c3c3c3;
height: 200px;
display: none;
}
.slide {
margin: 0;
padding: 0;
border-top: solid 4px #373737;
background: url(http://img638.imageshack.us/img638/5051/tabwo.png) no-repeat center top;
}
.btn-slide {
background: url(http://img21.imageshack.us/img21/8233/whitearrown.gif) no-repeat right -50px;
text-align: center;
width: 144px;
height: 31px;
padding: 10px 10px 0 0;
margin: 0 auto;
display: block;
font: bold 120%/100% Arial, Helvetica, sans-serif;
color: #fff;
text-decoration: none;
}
.active {
background-position: right 12px;
}
</style>
3. Now, for some HTML
Code:
</head>
<body>
<div id="panel">
<--!Your Content goes here-->
</div>
<p class="slide"><a href="http://www.graphiccentral.org/index.htm" class="btn-slide">Slide Panel</a></p>
That's it!
Tips!!!
~~ If you wanna change the background of the slider, find
Code:
background: #c3c3c3;
Adapted from WebArtzForum.com | Rob







