ดาวน์โหลดฟรี

ดาวน์โหลด AutoSprites - A jQuery Menu Plugin
เข้าชมทั้งหมด : 581 ครั้ง | ดาวน์โหลด : 113 ครั้ง | หมวด : Menu & Navigation


AutoSprites - A jQuery Menu Plugin

Setting up the jQuery Menu Plugin

The first component when doing something with sprites is a combined image that contains all menu states. For the menu above, this is the image was used.

The image contains, the normal state, the hover state and the active state. The value to doing things this way is that it allows your site to load faster. Rather than downloading an image for each nav item its hover state and its active state, only a single image needs to be downloaded. This minimizes the overhead of many http requests.

The next thing to do, is set up the HTML for the nav bar:

1 <ul id="hnav">
2  <li id="hnavhome"><a href="#">Home</a></li>
3  <li id="hnavlocal"><a href="#">Local Industry</a></li>
4  <li id="hnavhigher"><a href="#">Higher Education</a></li>