@@ -11,10 +11,18 @@ $(document).ready(function(){
1111 var selectedOption = $ ( this ) . find ( ":selected" ) . text ( ) ;
1212 $ ( this ) . next ( ".holder" ) . text ( selectedOption ) ;
1313 } ) . trigger ( 'change' ) ;
14- $ ( '.to-top' ) . bind ( 'click' , function ( evt ) {
14+ $ ( '.to-top' ) . on ( 'click' , function ( evt ) {
1515 $ ( "html, body" ) . animate ( { scrollTop : 0 } , "normal" ) ;
1616 } ) ;
1717
18+ $ ( '.ui-button' ) . on ( 'click' , function ( evt ) {
19+ var action = $ ( this ) . data ( 'action' ) ;
20+ var id = $ ( this ) . data ( 'id' ) ;
21+ if ( action == 'submit' && document . getElementById ( id ) ) {
22+ evt . preventDefault ( ) ;
23+ $ ( document . getElementById ( id ) ) . submit ( ) ;
24+ }
25+ } ) ;
1826
1927 var isMobile = false ; //initiate as false
2028 // device detection
@@ -194,7 +202,7 @@ $(document).ready(function(){
194202 }
195203 ) ;
196204
197- $ ( window ) . bind ( 'keypress' , function ( evt ) {
205+ $ ( window ) . on ( 'keypress' , function ( evt ) {
198206 var tag = evt . target . tagName . toLowerCase ( ) ;
199207 if ( evt . charCode == 97 && tag != 'input' && tag != 'textarea' && tag != 'selectbox' ) {
200208 evt . preventDefault ( ) ;
@@ -588,7 +596,7 @@ $(document).ready(function(){
588596 }
589597
590598 //
591- $ ( 'form#objects' ) . bind ( 'submit' , function ( evt ) {
599+ $ ( 'form#objects' ) . on ( 'submit' , function ( evt ) {
592600 $ ( '.l-unit' ) . find ( '.ch-toggle' ) . prop ( 'checked' , false ) ;
593601 $ ( '.l-unit.selected' ) . find ( '.ch-toggle' ) . prop ( 'checked' , true ) ;
594602 } ) ;
0 commit comments