Make keyboard selection UI work across all browsers (FireFox, Chrome, IE, Safari)

This commit is contained in:
Kelven Yang 2011-05-13 17:44:16 -07:00
parent 29c510de28
commit 101ff9bb42
2 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,8 @@ body {
#toolbar ul li ul { #toolbar ul li ul {
position: absolute; position: absolute;
top:32; top:32;
width: 130;
height: 66;
display: block; display: block;
display: none; display: none;
border-top: 1px solid black; border-top: 1px solid black;
@ -93,6 +95,7 @@ body {
padding:0 3px 0 3px; padding:0 3px 0 3px;
text-decoration:none; text-decoration:none;
line-height:32px; line-height:32px;
vertical-align: bottom; /* this is to fix the list gap in IE */
} }
#toolbar ul li ul li a:hover { #toolbar ul li ul li a:hover {

View File

@ -513,6 +513,8 @@ AjaxViewer.prototype = {
pullDownElement.hover( pullDownElement.hover(
function(e) { function(e) {
var subMenu = pullDownElement.find("ul"); var subMenu = pullDownElement.find("ul");
var offset = subMenu.parent().offset();
subMenu.css("left", offset.left);
$("li.current").removeClass("current"); $("li.current").removeClass("current");
$("li:eq(" + ajaxViewer.currentKeyboard + ")", subMenu).addClass("current"); $("li:eq(" + ajaxViewer.currentKeyboard + ")", subMenu).addClass("current");