Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if i click(mousedown) on button i have to show background color as black
and if i mouseup anywhere(if its button or page) it will remove the bgcolor like microsoft signin button

actually i want all styles like microsoft login page Signin button


how to write that in jquery please tell me
Posted
Updated 28-Dec-15 0:10am
v3

1 solution

Use the :focus pseudo-selector on your button...
:focus - CSS | MDN[^]
 
Share this answer
 
Comments
Parazival 28-Dec-15 6:12am    
thanks for your replay and i dont wanna focus() i wanna mousedown()
Kornfeld Eliyahu Peter 28-Dec-15 6:16am    
And what do you think clicking on a button (mousedown) will do to that control?
(to handle onmousedown event you will need some JS code...much more complicated)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900