update demo/websocket for updating JQuery to 3.1.0

This commit is contained in:
Samuel Chen 2016-08-08 16:01:50 +08:00
parent 6fd9c79c48
commit 1330854b9e
2 changed files with 3 additions and 3 deletions

View 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;

View 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>