0

I want to remove the blue color box thing if the form, inputs, select, textarea, button is clicked.

My problem is the blue box color thing is still appear and its annoys me :(.

Is this blue box thing removable by using jquery?

testing link: http://jsfiddle.net/5kcsn/309/

css:

input,
input:focus,
input:active,
input:hover
{
  border-color: #ccc;  
  box-shadow:  #ccc;
 border: 1px solid #ccc;
 outline:none;
}

script:

$("input, select, textarea, form, button").css("outline", "none");
$("input, select, textarea, form, button").css("box-shadow", "none");
user3882672
  • 125
  • 1
  • 2
  • 13

1 Answers1

1

Bootstrap use a specific class on form element. Since all its styling is based on that class, you can't override it with a tag selector. So instead of :

input:focus
{
  border-color: #ccc;  
  box-shadow:  #ccc;
  border: 1px solid #ccc;
  outline:none;
}

Use the bootstrap class :

.form-control:focus
{
  border-color: #ccc;  
  box-shadow:  #ccc;
  border: 1px solid #ccc;
  outline:none;
}
Karl-André Gagnon
  • 33,662
  • 5
  • 50
  • 75