Mac-Like CSS Dock Menu with jQuery

Mac-Like CSS Dock Menu with jQuery
File Size: 202 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A Mac-Like CSS Dock Menu with jQuery that comes with two dock position: top and bottom. 

Usage:

1. Include necessary javascirpts in your head

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/interface.js"></script>

2. Include CSS

<link href="style.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<style type="text/css">
   .dock img { behavior: url(iepngfix.htc) }
   </style>
<![endif]–>

3. Markup

<div class="dock" id="dock2">
<div class="dock-container2">
<a class="dock-item2" href="#"><span>Home</span><img src="images/home.png" alt="home" /></a> 
<a class="dock-item2" href="#"><span>Contact</span><img src="images/email.png" alt="contact" /></a> 
<a class="dock-item2" href="#"><span>Portfolio</span><img src="images/portfolio.png" alt="portfolio" /></a> 
<a class="dock-item2" href="#"><span>Music</span><img src="images/music.png" alt="music" /></a> 
<a class="dock-item2" href="#"><span>Video</span><img src="images/video.png" alt="video" /></a> 
<a class="dock-item2" href="#"><span>History</span><img src="images/history.png" alt="history" /></a> 
<a class="dock-item2" href="#"><span>Calendar</span><img src="images/calendar.png" alt="calendar" /></a> 
<a class="dock-item2" href="#"><span>Links</span><img src="images/link.png" alt="links" /></a> 
<a class="dock-item2" href="#"><span>RSS</span><img src="images/rss.png" alt="rss" /></a> 
<a class="dock-item2" href="#"><span>RSS2</span><img src="images/rss2.png" alt="rss" /></a> 
</div>
</div>

4. Call the function

<script type="text/javascript">

$(document).ready(
function()
{
$('#dock').Fisheye(
{
maxWidth: 50,
items: 'a',
itemsText: 'span',
container: '.dock-container',
itemWidth: 40,
proximity: 90,
halign : 'center'
}
)
$('#dock2').Fisheye(
{
maxWidth: 60,
items: 'a',
itemsText: 'span',
container: '.dock-container2',
itemWidth: 40,
proximity: 80,
alignment : 'left',
valign: 'bottom',
halign : 'center'
}
)
}
);

</script>

This awesome jQuery plugin is developed by unknown. For more Advanced Usages, please check the demo page or visit the official website.