芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/www/js/menuHeader - Copie.js
// DOM Ready $(function() { var $el, leftPos, newWidth; /* Add Magic Line markup via JavaScript, because it ain't gonna work without */ $("#menuHeader").append("
"); /* Cache it */ var $magicLine = $("#magic-line"); $magicLine .width($(".current_page_item").width()) .css("left", $(".current_page_item a").position().left) .data("origLeft", $magicLine.position().left) .data("origWidth", $magicLine.width()); $("#menuHeader li").find("a").hover(function() { $el = $(this); leftPos = $el.position().left; newWidth = $el.parent().width(); $magicLine.stop().animate({ left: leftPos, width: newWidth }); }, function() { $magicLine.stop().animate({ left: $magicLine.data("origLeft"), width: $magicLine.data("origWidth") }); }); /* Kick IE into gear */ $(".current_page_item_two a").mouseenter(); });