Powered by Blogger.

Saturday, 8 March 2014

couch mode print story

jQuery Sliding Panel with Expanding/Collapsing Contents.

Adding the jQuery Expand/Collapse Slider Panel

This sliding menu is made with jQuery, so the first thing is to add the script by pasting it just below the <head> tag:

Step 1. From your Blogger dashboard > go to Template > click on the Edit HTML button:
 Step 2. Click anywhere inside the code area and search by pressin the CTRL + F keys for the <head> tag

Step 3. Below the <head> tag, add this script:

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'></script>
<script type='text/javascript'>
$(document).ready(function() {

$(&quot;#open&quot;).click(function(){
$(&quot;div#panel&quot;).slideDown(&quot;slow&quot;);
});

$(&quot;#close&quot;).click(function(){
$(&quot;div#panel&quot;).slideUp(&quot;slow&quot;);
});

$(&quot;#toggle a&quot;).click(function () {
$(&quot;#toggle a&quot;).toggle();
});

});</script>

<b:if cond='data:blog.pageType != &quot;item&quot;'>
<style>
body#layout #slide-top-panel {display:none !important;}
</style>
</b:if>

Step 4. Now search (CTRL + F) the </head> tag and add the CSS styles just above it:

<style>
.clearfix:after {content: ".";display: block;height: 0;clear: both;visibility: hidden;}
.clearfix {display: inline-block;}
* html .clearfix {height: 1%;}
.clearfix {display: block;}
.clearfix {height: 1%;}
.clearfix {display: block;}

.tab {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTd2Rq-PY5tQtnLB6AnManJemU3K4lcr-bMzKRP5P4O-pf8E4wP-nDXxknnwEySjh3XKZ0x87p48agMOBZqByeKOM92AE7KUnpVNa6naiOAXmQjR9UEat7sY-tLm72RnSWvsvnJs7KPMO0/s1600/sliding-panel-tab-0.png) repeat-x 0 0;
height: 42px;
position: relative;
top: 0;
z-index: 999;
}
.tab ul.login {
display: block;
position: relative;
float: right;
clear: right;
height: 42px;
width: auto;
font-weight: bold;
line-height: 42px;
margin: 0;
right: 150px;
color: white;
font-size: 80%;
text-align: center;
}
.tab ul.login li.left {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB821hd0u9ofJrXumYjhYl5qYPxnzG9liDaEU7sH6gtM-MhDqdz9vjc_TAbEECNz5pdk129y_kTz8qmaeDs9FGCKsr3NmzYnv-wF5Hfi1qPHzJlQlKZ0rwKactbe6b1d_DvS_6AWO1ro8k/s1600/sliding-panel-tab-left.png) no-repeat left 0;
height: 42px;
width: 30px;
padding: 0;
margin: 0;
display: block;
float: left;
}
.tab ul.login li.right {
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVa1ibsuH5M65YhwEYHXcJ5V4jtxReiuAlB_nNb6iZX-g5lQ7vXsTDzRFsxI8uQSMDU5qqnfDFfgnK7KTIY2_5Y8cp8JpL5ra97gHfFCbFxcYMCSPeWH_AHB1zhJXFZCwzonScsN5Eg0JM/s1600/sliding-panel-tab-right.png) no-repeat left 0;
height: 42px;
width: 30px;
padding: 0;
margin: 0;
display: block;
float: left;
}
.tab ul.login li {
text-align: left;
padding: 0 6px;
display: block;
float: left;
height: 42px;
background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOr06CBXNKW2wYT1KjaIhC7VAHc7FSlhDf_A0YZw6oEgjVQqJZaI4RDwXVIlaVIdw68cwXu4gfvQLy2-PzI-719cGgu4vZU5pbzR5Ri7URKG7QL5C-x0C_1eMYz2KVrMcbzTlL3RxAB8up/s1600/sliding-panel-tab.png) repeat-x 0 0;
}

.tab ul.login li a {color: #15ADFF;}
.tab ul.login li a:hover {color: #FFFFFF;}
.tab .sep {color:#414141}

.tab a.open, .tab a.close {
height: 20px;
line-height: 20px !important;
padding-left: 30px !important;
cursor: pointer;
display: block;
width: 100px;
position: relative;
top: 11px;
}

.tab a.open {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheXn3DhHINnvshIQb0xhotLs_0uSNbYY-UqJ_dP3zlllbWKGSOZsXse3agA_LnOBqiDecHOfC6kF3lP66j_BzFY6JWG816G9rS-GQwiQlLlLQhnmIbk8VUkFeoZ8gP_g0coorSvSl4uiKp/s1600/button-open.png) no-repeat left 0;}
.tab a.close {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjITtLsW8twSYiw7idl-okFyT-9RE3tsyTlBx60qvVGIuuoPUz44yh7q7wiwO_mSTzYkNnEQStJEr6rMt9jW-5ov1O3Vi7kTcx6X3vqoTQx6DYlQ1mi6rjL1OZ6h9l6XCh1r-BWU8-GjqNX/s1600/button-close.png) no-repeat left 0;}
.tab a:hover.open {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheXn3DhHINnvshIQb0xhotLs_0uSNbYY-UqJ_dP3zlllbWKGSOZsXse3agA_LnOBqiDecHOfC6kF3lP66j_BzFY6JWG816G9rS-GQwiQlLlLQhnmIbk8VUkFeoZ8gP_g0coorSvSl4uiKp/s1600/button-open.png) no-repeat left -19px;}
.tab a:hover.close {background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjITtLsW8twSYiw7idl-okFyT-9RE3tsyTlBx60qvVGIuuoPUz44yh7q7wiwO_mSTzYkNnEQStJEr6rMt9jW-5ov1O3Vi7kTcx6X3vqoTQx6DYlQ1mi6rjL1OZ6h9l6XCh1r-BWU8-GjqNX/s1600/button-close.png) no-repeat left -19px;}

#slide-top-panel {
position: absolute;
top: 0;
width: 100%;
z-index: 999;
text-align: center;
margin-left: auto;
margin-right: auto;
}
#panel {
width: 100%;
height: 230px;
color: #999999;
background: #272727;
overflow: hidden;
position: relative;
z-index: 3;
display: none;
}
#panel h4 {
font-size: 18px;
color: #F2F2F2;
text-align: center;
padding: 5px 0 10px;
margin: 0;
}
#panel p {
margin: 5px 0;
padding: 0px;
}
#panel a {
text-decoration: none;
color: #15ADFF;
}
#panel a:hover {
color: white;
}
#panel .content {
width: 960px;
margin: 0 auto;
padding-top: 15px;
text-align: left;
font-size: 0.85em;
}
#panel .content .left {
width: 280px;
float: left;
padding: 0 15px;
border-left: 1px solid #333;
}
#panel .content .right {
border-right: 1px solid #333;
}
#panel .content form {
margin: 0 0 10px 0;
}
#panel .content label {
float: left;
padding-top: 8px;
clear: both;
width: 280px;
display: block;
}
#panel .content input.field {
border: 1px #1A1A1A solid;
background: #545454;
border-radius: 10px;
margin-right: 5px;
margin-top: 4px;
width: 200px;
color: white;
height: 18px;
}
#panel .content input:focus.field {
background: #7F7F7F;
}
#panel .content input.button-register {
display: block;
clear: both;
height: 24px;
width: 94px;
color: white;
background: transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFbRPxetBuMwadxjOdhRZaBEvqwEcgSTWrio_SAwYIiQ43WwJAp5kLy8-0mymQQ4cHvmprbHuoNyPzBgu_aujNmIgSvSakJ2Q4xHqbf85FqR6Pz5GOEcqot6mwGI_m5fmKJtYsX_thM3OC/s1600/button-register.png) no-repeat 0 0;
text-align: center;
cursor: pointer;
border: none;
font-weight: bold;
margin: 10px auto;
}
#sliding-panel {
width: 160px;
float: left;
}
#sliding-panel2 {
width: 160px;
float: right;
}
#sliding-panel ul, #sliding-panel2 ul{
font-family: Arial, Helvetica, sans-serif;
list-style-type:none;
margin:0;
padding:0;
}
#sliding-panel ul li a, #sliding-panel2 ul li a {
background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdIEdaykg3sGzbvxbxL-t26Cmgf3z16VsnIY89B-xWacOG5vHCH6DKzjmjdR2YrfVVFIWUVnMgGhhapGJfRyZEfA-4IDN4zyb_2KmlUAT7rY24lq9ZUZJY4JvvRL1ABlc2mJJAFOGFE-Qh/s1600/star-bullet.png) center left no-repeat;
margin:0;
padding:3px 3px 3px 18px;
}
#sliding-panel li, #sliding-panel2 li {
display: inline;
}
#sliding-panel a, #sliding-panel2 a{
color: #999999;
text-decoration: none;
font-size: 11px;
display: block;
padding: 3px;
width: 160px;
}
#sliding-panel a:link, #sliding-panel a:visited, #sliding-panel2 a:link, #sliding-panel2 a:visited {
color: #999999;
text-decoration: none;
}
#sliding-panel a:hover, #sliding-panel2 a:hover {
color: #FFFFFF;
}

#search-box22{
margin-top: 20px;
}

#search-box22 input[type="text"] {
float: right;
background: 10px 6px #444;
border: 0 none;
font: bold 12px Arial,Helvetica,Sans-serif;
color: #777;
width: 160px;
padding: 6px 15px 6px 35px;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
text-shadow: 0 2px 2px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 3px rgba(0, 0, 0, 0.2) inset;
-webkit-transition: all 0.7s ease 0s;
-moz-transition: all 0.7s ease 0s;
-o-transition: all 0.7s ease 0s;
transition: all 0.7s ease 0s;
}

#search-box22 input[type="text"]:focus {
width: 190px;
}

.about-author {
width: 100%;
text-transform: none;
margin-top: 15px;
}
.authorbox {
overflow: hidden;
padding: 0;
width: 100%;
}
.authorbox .authorinfo {
}
.authorbox .authorinfo img {
float: left;
margin: 4px 10px 4px 5px;
border-radius: 100%;
width: 20%;
background: #222;
padding: 5px;
}
.authorbox .authorinfo p {
margin: 0;
padding: 0 5px;
text-align: left;
}
.authorinfo p a {
text-decoration:none;
}
.authorbox h3 {
margin: 0;
display: inline-block;
}
h3.boxtitle {
font-size: 14px;
}
</style>
 Note:
- in case you need more space for your widgets, the height of the entire container can be changed by modifying the 230px value from height: 230px;
- To change the background color, change this color value: #272727


0 comments:

Post a Comment