Skip to content

Commit

Permalink
Fixed bug where hover items was not catching the side bar items for t…
Browse files Browse the repository at this point in the history
…he stories actions.
  • Loading branch information
baphled committed May 31, 2010
1 parent dc29db0 commit a9b9b41
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions public/javascripts/item_hover.js
@@ -1,11 +1,13 @@
$(document).ready(function() {

var hoverItem = function() {
$sidebarPostfix = $('div#sidebar > ul').attr('id').split('_');

$hover_class = 'li#' + $(this).attr('id') + '_' + $sidebarPostfix[1];
$($hover_class).toggle();
var $hoverItem = function() {
var sidebarPostfix = $('div#sidebar > ul').attr('id').split('_');
var $sidebar = $('div#sidebar > ul');

var item = 'li#' + $(this).attr('id') + '_' + sidebarPostfix[1];

$sidebar.find(item).toggle();
};

$("div.list_item").live('mouseover mouseout', hoverItem);
$("div.list_item").live('mouseover mouseout', $hoverItem);
});

0 comments on commit a9b9b41

Please sign in to comment.