Add Css/Jquery fixed horizontal menu to blogger blog

Add Css/Jquery fixed horizontal menu to blogger blog

Hohoho, selamat sore, di kesempatan akan membawakan mengenai widgets cpu ram battery apk Add Css/Jquery fixed horizontal menu to blogger blog simak selengkapnya

This navigation bar made with CSS & jQuery gets semi-transparent when you scroll down the page and is slightly showing up by fading out gradually becoming almost transparent. When the user hovers oper it, the menu becomes opaque again.

Inside the navigation we have some links, a search input and top & bottom buttons making it easier for the user to navigate to the top or bottom of the page.



If you want to add this horizontal menu with CSS/jQuery to a Blogger blog, follow the steps below:

1. Log into your Blogger account and select your blog, then go to "Template" and press the "Edit HTML" button.

2. Click anywhere inside the code area and search using CTRL + F keys, this tag:

</head> 

3. Just above/before the </head> tag, add the following scripts and CSS code for the jQuery menu:

<style type="text/css">#navheight:35px;border-bottom:1px solid #ddd;position:fixed;top:0;left:0;right:0;background:#fff url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhctc1hhIJk2Bq74EgExh8innax9tB3dbXJ9UaMlXLUYfXzlyYBlTBSza6u47zRNpJDzeJsnW3EPm2HZ3aE1w3DJa5I5Ok40YKfmX3VB063-WwMN0SRGVV2zAp-bQa_XU4jKoQBnnftPIP6/s1600/navbar.png) repeat-x center left;z-index:999999#nav ulheight:25px;list-style:none;margin:6px auto 0;width:600px#nav ul lidisplay:inline;float:left;margin:0 2px#nav abulat #ccc;cursor:pointer;background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSJPdohRoT9cE9KMV8trpgdIjq9TVUfmwCIHrs5VN4L36wgZSxkmLii4ZQgJV9bffVra_4nCMoI6tdfXUPEqJuhAvHPAN2xJ2B2hmrM7gsTz7dUYBakd5Nty2bAdj72xNn4qg-W7XLEniU/s1600/overlay.png) repeat-x center left;height:16px;line-height:16px}#nav a:hoverbackground-color:#D9D9DA;color:#fff#nav a.top span,#nav a.bottom spanfloat:left;width:16px;height:16px#nav a.top spanbackground:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoicem24z8MmW91sHLp4kbuGjZRDPxxUHEgXHMniirbI89neTEijjhjUqg3xha_3VG_EvKdE_hHfkcMp6-7ExDSgeAA5L9NZuYIOe_vdkv6S3vN2XaROhNk4xV25-bO9_gnDtdrP5x1czX/s1600/top.png) no-repeat center center#nav a.bottom spanbackground:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyGZCN2XJTarEhhp9vYg6bO3J5YcK207YZVun7zhWBst8s6IqzUtCiL4l9YT8z5xyb0fBorwviKS4DF-jmSDqcRo-PO2HNy9djHtYKRq_plNOg2H-lEoh2kF_EEIPXUFxus9MsN0RK_e9H/s1600/bottom.png) no-repeat center center#nav ul li.searchfloat:right#nav input[type="text"]float:left;border:1px solid #ccc;margin:0 1px 0 50px;padding:2px;line-height:16pxinput.searchbuttonbulat #ccc;padding:1px;cursor:pointer;width:26px;line-height:16px;background:#E8E9EA url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_oe7A-9Wr0lvCcChdL7VfCr4OA3cvzwfdBSaLajU02RIEG6Mv9cOIGaNPH0uAgk0XZ8GhJFYzP4atifesceNUeKkicbCboW5Cp750Q0xWIHZVnaydMDoyVXsOwGtoZ6Ii0pLx1qYmsnoH/s1600/search.png) no-repeat center center}input.searchbutton:hoverbackground-color:#D9D9DA</style>

<script type="text/javascript" src="https://code.jquery.com/jquery-1.3.2.min.js"></script>

 <script type="text/javascript">//<![CDATA[

$(function()$(window).scroll(function()var a=$(window).scrollTop();0!=a?$("#nav").stop().animate(opacity:"0.2",400):$("#nav").stop().animate(opacity:"1",400)),$("#nav").hover(function(a)var b=$(window).scrollTop();0!=b&&$("#nav").stop().animate(opacity:"1",400),function(a)var b=$(window).scrollTop();0!=b&&$("#nav").stop().animate(opacity:"0.2",400)));//]]></script>

4. Next, search for this tag:

<body>

If you can't find it, search for this one:

<body expr:class='&quot;loading&quot; + data:blog.mobileClass'>

5. Just below/after this code, copy and paste the HTML structure of the menu:

<div id="nav">

<ul>

<li><a class="top" href="#top"><span></span></a></li>

<li><a class="bottom" href="#bottom"><span></span></a></li>

<li><a href='URL address'><span>Link 1</span></a></li>

<li><a href='URL address'><span>Link 2</span></a></li>

<li><a href='URL address'><span>Link 3</span></a></li>

<li><a href='URL address'><span>Link 4</span></a></li>

<li><a href='URL address'><span>Link 5</span></a></li>

<li><a href='URL address'><span>Link 6</span></a></li>

<li class="search">

<form method="get" action="/search">

<input name="q" type="text" placeholder="Search..."/><input type="submit" value="" class="searchbutton"/>

</form>

</li>

</ul>

</div>

<div id="top"></div>

Note: Replace URL address with the URL of your pages and Link 1, 2, 3, 4, 5, 6 with the link title that will show in the menu.

6. Finally, search for the following tag:

</body>

Just above the </body> tag, add the following HTML code:

<div id="bottom"></div>

7. Click the "Save Template" button and you're done adding the menu. Enjoy!

Credit: Tympanus. This menu was inspired by David Walsh's top navigation bar.

Oke detil tentang Add Css/Jquery fixed horizontal menu to blogger blog semoga tulisan ini berfaedah terima kasih

Artikel ini diposting pada tag

Komentar

Postingan populer dari blog ini

Cara Membuat Blog - Panduan Lengkap Agar Mahir Buat Blog Cara Membuat Blog Agar Banyak Pengunjung

Ingin Belajar Membuat Blog? Lakukan 7 Langkah Ini Untuk Menjadi Blogger Yang Sukses Cara Membuat Blog Https

Ingin Belajar Membuat Blog? Lakukan 7 Langkah Ini Untuk Menjadi Blogger Yang Sukses Cara Membuat Blog Cerpen