forms - how can i customize with jQuery Validation Plugin? -


i want customize jquery validation plugin. "empty" , "wrong" show different color, when field empty color of messege , border-color red, when field wrong color turn yellow, , when don't select choice click submit, select tag border-color become red. don't know how can change .error class(the default setting of plugin) of new label tag...

<form class="cmxform" id="commentform" method="post" action="javascript:alert('完成');">     <fieldset>         <legend>* required</legend>         <p>             <label for="cname">choice(*)</label>             <select id="cname" required>                 <option disabled selected value="000">000</option>                 <option value="111">111</option>                 <option value="222">222</option>                 <option value="333">333</option>             </select>         </p>         <p>             <label for="cname">name(*)</label>             <input id="cname" name="name" class="required" minlength="2" />         </p>         <p>             <label for="cemail">email(*)</label>             <input id="cemail" name="email" class="required email" />         </p>         <p>             <label for="curl">url</label>             <input id="curl" name="url" class="url" value="" />         </p>                 <p>             <label for="phone">phone</label>             <input id="phone" name="phone" class="digits" value="" />         </p>                 <p>             <label for="ccomment">reply (*)</label>           <textarea id="ccomment" name="comment" class="required"></textarea>         </p>         <p>             <input class="submit" type="submit" value="submit"/>         </p>     </fieldset> </form> 

label.error {     color: #fec929; } .error {     border-color: #fec929; } label.empty {     color: #ec3046; } .empty {     border-color: #ec3046; } textarea {     resize: none; } 

http://jsfiddle.net/5rrga/1871/ jsfiddle, thanks!


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -