File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
< html >
2
2
< head >
3
+ < link href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css " rel ="stylesheet "/>
3
4
< link href ="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css " rel ="stylesheet "/>
4
5
< script src ="https://code.jquery.com/jquery-3.1.1.min.js "> </ script >
5
6
< script src ="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js "> </ script >
6
7
< title > Realtime Chat</ title >
7
8
</ head >
8
9
< body >
9
- < nav class ="navbar navbar-toggleable-md navbar-light bg-faded ">
10
+ < nav class ="navbar sticky-top navbar-toggleable-md navbar-light bg-faded ">
10
11
< h1 class ="navbar-brand mb-0 "> Realtime Chat</ h1 >
12
+ < a class ="btn btn-secondary ml-auto " href ="https://github.com/dhanyn10/simple-chat-socketio " target ="_blank "> Fork < i class ="fa fa-code-fork " aria-hidden ="true "> </ i > </ a >
11
13
</ nav >
12
14
< div class ="container ">
13
15
< div class ="row ">
@@ -18,7 +20,7 @@ <h1 class="navbar-brand mb-0">Realtime Chat</h1>
18
20
< div class ="container ">
19
21
< div class ="row ">
20
22
< textarea id ="ms " class ="form-control "> </ textarea >
21
- < button class ="btn btn-outline-danger "> Send</ button >
23
+ < button class ="btn btn-outline-danger " id =" send " > Send</ button >
22
24
</ div >
23
25
</ div >
24
26
</ div >
@@ -28,7 +30,7 @@ <h1 class="navbar-brand mb-0">Realtime Chat</h1>
28
30
< script >
29
31
var socket = io ( ) ;
30
32
31
- $ ( '.btn ' ) . click ( function ( ) {
33
+ $ ( '#send ' ) . click ( function ( ) {
32
34
socket . emit ( 'chat message' , $ ( '#ms' ) . val ( ) ) ;
33
35
$ ( '#ms' ) . val ( '' ) ;
34
36
return false ;
You can’t perform that action at this time.
0 commit comments