Browse files

improve code using .hover function instead.

  • Loading branch information...
1 parent 32cfe11 commit 4aa4e7c9cf4f2b808b294909abd020fd4c783ff5 @parndt parndt committed Jul 9, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 public/javascripts/portfolio.js
View
6 public/javascripts/portfolio.js
@@ -9,7 +9,7 @@ reset_functionality = function() {
});
$('#content #portfolio_images li:not(.empty)').each(function(index, li) {
- $(li).mouseover(function(e){
+ $(this).hover(function(e){
if ((image_actions = $(this).find('.image_actions')).length == 0) {
image_actions = $("<div class='image_actions'></div>");
img_delete = $("<img src='/images/refinery/icons/delete.png' width='16' height='16' />");
@@ -22,9 +22,7 @@ reset_functionality = function() {
}
image_actions.show();
- });
-
- $(li).mouseout(function(e) {
+ }, function(e) {
$(this).find('.image_actions').hide();
});
});

0 comments on commit 4aa4e7c

Please sign in to comment.