By the looks of it {he thinks} he knows what he’s doing.

jQuery Gem

Here is a little jQuery gem I was able to figure out.

$(".outerDiv").hover(
function(){ $(this).find(".innerDiv").show(); },
function(){ $(this).find(".innerDiv").hide(); }
);

What the above code does is show <div class="innerDiv"></div> when <div class="outerDiv"></div> is hovered, and return the innerDiv to a hidden state when the the hover is lost.

I found this useful to show edit and delete links when a user hovered over a particular database item.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a comment for: "jQuery Gem"

You must be logged in to post a comment.