File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 510510 if ( ! self . checkValidity ( null , e ) ) {
511511 return e . preventDefault ( ) ;
512512 }
513+ // Reset event type and target
514+ e . target = form ;
515+ e . type = conf . formEvent ;
513516 } ) ;
514517 }
515518
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < script src ="../js/jquery-1.4.2.min.js "> </ script >
3+ < script src ="../../src/validator/validator.js "> </ script >
4+
5+ < form action ="http://google.com/search " style ="margin:100px ">
6+
7+ < label >
8+ requred text
9+ < input name ="q " type ="text " required ="required " />
10+ </ label >
11+
12+ < a href ="# " class ="submit "> Submit</ a >
13+ </ form >
14+
15+ < script >
16+ $ ( "form" ) . validator ( { position : 'top center' } ) ;
17+ $ ( "a.submit" ) . click ( function ( event ) {
18+ event . preventDefault ( ) ;
19+ $ ( "form:first" ) . submit ( ) ;
20+ } ) ;
21+ </ script >
You can’t perform that action at this time.
0 commit comments