:: Sponsored By ::

A simple Drop Down Menu

Posted on June 2, 2010 by Purpleroses

Ada macam-macam jenis dropdown menu. PR tunjuk yang PR punya je ok. NI pon PR amik kat internet. Kongsi² la..


Go to DESIGN > LAYOUT > EDIT HTML > edit HTML, 

Cari </head>


Copy Code ini,


<!--jquery-DD-Menu-Starts-->
<style type="text/css">
/* menu styles */
#jsddm
{ margin: 0;
padding: 0}

#jsddm li
{ float: left;
list-style: none;
font: 12px Tahoma, Arial}

#jsddm li a
{ display: block;
background: #324143;       /*Color ikut suka*/
padding: 5px 12px;
text-decoration: none;
border-right: 1px solid white;
width: 70px;
color: #EAFFED;
white-space: nowrap}

#jsddm li a:hover
{ background: #24313C}

#jsddm li ul
{ margin: 0;
padding: 0;
position: absolute;
visibility: hidden;
border-top: 1px solid white}

#jsddm li ul li
{ float: none;
display: inline}

#jsddm li ul li a
{ width: auto;
background: #000000;     /*PILIH COLOR*/
color: #24313C}

#jsddm li ul li a:hover
{ background: #8EA344}
</style>


<!-- script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var timeout = 500;
var closetimer = 0;
var ddmenuitem = 0;

function jsddm_open()
{ jsddm_canceltimer();
jsddm_close();
ddmenuitem = $(this).find('ul').eq(0).css('visibility', 'visible');}

function jsddm_close()
{ if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}

function jsddm_timer()
{ closetimer = window.setTimeout(jsddm_close, timeout);}

function jsddm_canceltimer()
{ if(closetimer)
{ window.clearTimeout(closetimer);
closetimer = null;}}

$(document).ready(function()
{ $('#jsddm > li').bind('mouseover', jsddm_open);
$('#jsddm > li').bind('mouseout', jsddm_timer);});

document.onclick = jsddm_close;
</script>
<!--jquery-DD-Menu-Stops-->


Kemudian Pergi ke Add gadget, ADD HTML/JAVASCRIPT,

Paste code ini;


<!--BODY-CODE-->
<ul id="jsddm">
<li><a href="#">JavaScript</a>
<ul>
<li><a href="#">Drop Down Menu</a></li>
<li><a href="#">jQuery Plugin</a></li>
<li><a href="#">Ajax Navigation</a></li>
</ul>
</li>
<li><a href="#">Effect</a>
<ul>
<li><a href="#">Slide Effect</a></li>
<li><a href="#">Fade Effect</a></li>
<li><a href="#">Opacity Mode</a></li>
<li><a href="#">Drop Shadow</a></li>
<li><a href="#">Semitransparent</a></li>
</ul>
</li>
<li><a href="#">Navigation</a></li>
<li><a href="#">HTML/CSS</a></li>
</ul>


Ni yg PR punye;


<!--BODY-CODE-->
<ul id="jsddm">
<li><a href="#">Header</a>
<ul>
<li><a href="http://lovepurpleroses.blogspot.com/2010/04/add-header-image-in-blog.html">Add Image Header</a></li>

</ul>
</li>
<li><a href="#">Footer</a>
<ul>
<li><a href="http://lovepurpleroses.blogspot.com/2010/06/add-column-to-blogger-footer.html">Add a column</a></li>
<li><a href="#">Edit Footer</a></li>
</ul>
</li>
<li><a href="#">Sidebar</a>
<ul>
<li><a href="http://lovepurpleroses.blogspot.com/2010/06/sidebar-gadget-in-separate-box.html">Gadget in Separate Box</a></li>
<li><a href="http://lovepurpleroses.blogspot.com/2010/06/make-slide-for-banner.html">Slide for Banner or Image</a></li>
</ul>
</li>
<li><a href="#">Extra</a>
<ul>
<li><a href="http://lovepurpleroses.blogspot.com/2010/06/add-extra-add-gadget.html">Extra Add a Gadget</a></li>
<li><a href="http://lovepurpleroses.blogspot.com/2010/06/add-favicon-to-blogger_07.html">Add Favicon</a></li>

<li><a href="http://lovepurpleroses.blogspot.com/2010/05/add-widget-index.html">Add Widget Index</a></li>
</ul>
</li>
<li><a href="#">Post</a>
<ul>
<li><a href="http://lovepurpleroses.blogspot.com/2010/06/different-color-or-background-post.html">Different Color or Background</a></li>

<li><a href="http://lovepurpleroses.blogspot.com/2010/05/blink-text.html">Blink² Text</a></li>
</ul></li></ul>


Kemudian Save. Selamat mencuba.

0 Responses to "A simple Drop Down Menu":

 

This Template is Brought to you by : AllBlogTools.com blogger templates

Blogger Templates