Axel Nordh 4 роки тому
батько
коміт
004e6831e1
1 змінених файлів з 9 додано та 8 видалено
  1. 9 8
      OddsJavaFx/src/web/matchTable.php

+ 9 - 8
OddsJavaFx/src/web/matchTable.php

@@ -54,16 +54,17 @@ $matches = $conn->getMatches($countryId, $leagueId);
 </table>
 </table>
 
 
 <script>
 <script>
-
-$('form').live('submit', function() {
-	$.post($(this).attr('action'), $(this).serialize(), function(response) {
-		// here on success
-		console.log("Sent bet to db");
-	}, 'json');
-	return false;
+$(document).ready(function(){
+	var $form = $('form');
+    $('form').live('submit', function() {
+    	$.post($(this).attr('action'), $(this).serialize(), function(response) {
+    		// here on success
+    		console.log("Sent bet to db");
+    	}, 'json');
+    	return false;
+    });
 });
 });
 
 
-
 </script>
 </script>
 
 
 </body>
 </body>