This example describes the jquery professional pull-down menu effects. Share to everyone for your reference. Specifically as follows:
This is based on jquery implementation of the Professional Pull-down menu effects, blue-style pull-down menu is very classic, whether the site has an attractive navigation will affect the user's long stay, just like the small editor of the content of the article affect the parents visit the same time long. You should learn how to build a navigation menu of your own website style.
Run Effect chart:-------------------View effect Download source code-------------------
Tip: If you are not running properly in your browser, you can try switching browsing mode.
Key code:
Stuhover = function () {
var cssrule;
var newselector;
for (var i = 0, i < document.styleSheets.length i++) for
(var x = 0; x < document.stylesheets[i].rules.length; x+
+)
{
cssrule = document.stylesheets[i].rules[x];
if (CssRule.selectorText.indexOf ("Li:hover")!=-1)
{
newselector = cssRule.selectorText.replace
(/li : Hover/gi, "Li.iehover");
Document.stylesheets[i].addrule (Newselector,
cssRule.style.cssText);
}
var Getelm = document.getElementById ("Nav"). getElementsByTagName
("LI");
for (var i=0; i<getelm.length; i++) {
getelm[i].onmouseover=function () {
this.classname+= "iehover";
}
getelm[i].onmouseout=function () {
this.classname=this.classname.replace (new RegExp ("
iehover\\b") ), "");
}
}
}
if (window.attachevent) window.attachevent ("onload", stuhover);
For everyone to share the jquery Professional pull-down menu effect code is as follows
The above is for you to share the jquery Professional navigation menu Special effects code, I hope you can enjoy, and apply to practice.