On facebook for example – when you put your mouseover a news item, a remove button appears. How can I go about making this happen?
Thanks,
Elliot
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Modern Browsers
In modern browsers, you can leverage the
:hoverpseudo class in our selector. As an example, consider the following markup:By default, we would want the
.adminControlsto be hidden. They should, however, become visible once the user has hovered the.itemelement:JavaScript and jQuery
If you’re using jQuery, you can accomplish this rather easily using the $.hover() method. If you’re using Prototype, you can get the protoHover plugin to achieve the same result, or view this blog post.
That would accomplish the show/hide effect for the following: