]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
update demo/websocket for updating JQuery to 3.1.0 1792/head
authorSamuel Chen <wei.chen11@hp.com>
Mon, 8 Aug 2016 08:01:50 +0000 (16:01 +0800)
committerSamuel Chen <wei.chen11@hp.com>
Mon, 8 Aug 2016 08:01:50 +0000 (16:01 +0800)
demos/websocket/static/chat.js
demos/websocket/templates/index.html

index b4bb18a935962cad3700f4e9004ff12484c4797f..4e7ec0490cf6fcb87d79dd6ebfcdff05a6a5bef8 100644 (file)
@@ -16,11 +16,11 @@ $(document).ready(function() {
     if (!window.console) window.console = {};
     if (!window.console.log) window.console.log = function() {};
 
-    $("#messageform").live("submit", function() {
+    $("#messageform").on("submit", function() {
         newMessage($(this));
         return false;
     });
-    $("#messageform").live("keypress", function(e) {
+    $("#messageform").on("keypress", function(e) {
         if (e.keyCode == 13) {
             newMessage($(this));
             return false;
index cbf2b23dbe7f0fd9918b539eba72b694c25376c6..91a4536394f27429f07e5a8245b1826f53d1fe58 100644 (file)
@@ -27,7 +27,7 @@
         </form>
       </div>
     </div>
-    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script>
+    <script src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js" type="text/javascript"></script>
     <script src="{{ static_url("chat.js") }}" type="text/javascript"></script>
   </body>
 </html>