Best approach for extending unobtrusive javascript in MVC3 to add a style to a div client side

后端 未结 7 859
情话喂你
情话喂你 2021-01-31 03:50

I\'m using html5/Razor/MVC3 leveraging the Bootstrap template from Twitter. I want to have form validation that looks slick like they\'ve documented (http://twitter.github.com/b

7条回答
  •  佛祖请我去吃肉
    2021-01-31 04:13

    I prefere to change the CSS of bootstrap. Just added the classes of jQuery validate in the right place. field-validation-error and input-validation-error

        form .clearfix.error > label, form .clearfix.error .help-block, form .clearfix.error .help-inline, .field-validation-error {
      color: #b94a48;
    }
    form .clearfix.error input, form .clearfix.error textarea, .input-validation-error {
      color: #b94a48;
      border-color: #ee5f5b;
    }
    form .clearfix.error input:focus, form .clearfix.error textarea:focus, .input-validation-error:focus {
      border-color: #e9322d;
      -webkit-box-shadow: 0 0 6px #f8b9b7;
      -moz-box-shadow: 0 0 6px #f8b9b7;
      box-shadow: 0 0 6px #f8b9b7;
    }
    

提交回复
热议问题