Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove focus from submit button

Tags:

How can I remove focus from submit button? I don't know why it is there in the first plate, and it looks really ugly here is a screenshot :

alt text

And here is how it should look like, it regains its appearance after I click beside it and hover it.alt text

like image 543
ant Avatar asked Mar 13 '10 18:03

ant


People also ask

How do I remove the focus button?

OPTION 1: Use the :focus-visible pseudo-class The :focus-visible pseudo-class can be used to remove outlines and focus rings on buttons and various elements for users that are NOT navigating via keyboard (i.e., via touch or mouse click).

How do I remove the focus from my input box?

To remove the focus on an input tag element in HTML, you can use the blur() method on the element using JavaScript. This input tag will be already focussed when a user visits the website and we want to remove the focus when we click the button below it.


1 Answers

This worked :

var selectedInput = null; $(document).ready(function() {     $('input, textarea, select').focus(function() {         this.blur();     }); }); 
like image 147
ant Avatar answered Oct 05 '22 09:10

ant