MenuBar

Saturday, September 10, 2016

TutorialBlog: Cute Click Menu Tab for Sidebar (by Lyssa)

Assalamualaikum and hi,

Only appear when click:

1. Log in > Dashboard > Template > Edit Html

2. Ctrl+F to find : </head> atau </body>

3. Copy this code:

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js' type='text/javascript'/>
<script>
$(document).ready(function() {
$(&quot;.tab_content&quot;).hide(); //Hide all content
$(&quot;ul.tabs li:first&quot;).addClass(&quot;active&quot;).show(); //Activate first tab
$(&quot;.tab_content:first&quot;).show(); //Show first tab content
//On Click Event
$(&quot;ul.tabs li&quot;).click(function() {
$(&quot;ul.tabs li&quot;).removeClass(&quot;active&quot;); //Remove any &quot;active&quot; class
$(this).addClass(&quot;active&quot;); //Add &quot;active&quot; class to selected tab
$(&quot;.tab_content&quot;).hide(); //Hide all tab content
var activeTab = $(this).find(&quot;a&quot;).attr(&quot;href&quot;); //Find the href attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active ID content
return false;
});
});</script>

4. Paste above </head> 

5. Ctrl+F find : ]]></b:skin>

6. Then copy this code:

ul.tabs {
margin: 0;
padding: 0;
float: left;
list-style: none;
height: 300px; /*--Set height of tabs--*/
border-bottom: 1px solid #999;
border-left: 1px solid #999;
width: 100%;
}
ul.tabs li {
float: left;
margin: 0;
padding: 0;
height: 150px; /*--Subtract 1px from the height of the unordered list--*/
line-height: 300px; /*--Vertically aligns the text within the tab--*/
border: 1px solid #999;
border-left: none;
margin-bottom: -1px; /*--Pull the list item down 1px--*/
overflow: hidden;
position: relative;
background: #e0e0e0;
}
ul.tabs li a {
text-decoration: none;
color: #000;
display: block;
font-size: 1.2em;
padding: 0 20px;
border: 1px solid #fff; /*--Gives the bevel look with a 1px white border inside the list item--*/
outline: none;
}
ul.tabs li a:hover {
background: #ccc;
}
html ul.tabs li.active, html ul.tabs li.active a:hover { /*--Makes sure that the active tab does not listen to the hover properties--*/
background: #fff;
border-bottom: 1px solid #fff; /*--Makes the active tab look like it's connected with its content--*/
}
.tab_container {
border: 1px solid #999;
border-top: none;
overflow: hidden;
clear: both;
float: left; width: 100%;
background: #fff;
}
.tab_content {
padding: 20px;
font-size: 1.2em;
}

7. Paste above this code : ]]></b:skin>

8. Preview, to confirm any error. Then SAVE !

9. Page Element > Add A Gadget > Html/JavaScript

10. Copy paste into HTML area :

<ul class="tabs">
<li><a href="#tab1"><center><img src="URL IMAGE HERE"/></center></a></li>
<li><a href="#tab2"><center><img src="URL IMAGE HERE"/></center></a></li>
<li><a href="#tab3"><center><img src="URL IMAGE HERE"/></center></a></li>
</ul>
<div class="tab_container">
<div id="tab1" class="tab_content">
--->>> YOUR TABS 1 CONTENT <<<---
</div>
<div id="tab2" class="tab_content">
--->>> YOUR TABS 2 CONTENT <<<---
</div>
<div id="tab3" class="tab_content">
--->>> YOUR TABS 3 CONTENT <<<---
</div>
</div>
</div>


**Red : Paste URL TITLE (Shoutbox, LIKE MY PAGE)

**Biru : Paste Widget Code. (Shoutbox, Like Fan, etc)

11. SAVE!!

http://i.imgur.com/SZj4f.png
http://i.imgur.com/sIXrZ.png
http://i.imgur.com/kU06y.png
http://i.imgur.com/qtQOC.png
http://i.imgur.com/ymBTv.png
http://i.imgur.com/mWSg5.png


Source: Lyssa
Share your experience down below!

No comments:

Post a Comment