Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dustismo committed Apr 26, 2013
1 parent cf8c942 commit 45589db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
<script type="text/javascript">

function connect() {
strest = new Strest(
$('#websocket_url').val(),
function(event) {
strest = new Strest({
url : $('#websocket_url').val(),
onopen : function(event) {
$('#once_connected').fadeIn();
$('#disconnect_button').fadeIn();
$('#connect_button').fadeOut();
},
function(event) {
onclose : function(event) {
$('#connect_button').fadeIn();
$('#disconnect_button').fadeOut();
$('#once_connected').fadeOut();
}
);
});
}

function disconnect() {
Expand Down
10 changes: 5 additions & 5 deletions example.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

function connect() {

strest = new Strest(
$('#websocket_url').val(),
function(event) {
strest = new Strest({
url : $('#websocket_url').val(),
onopen : function(event) {
$('#not_connected').fadeOut();
$('#connected').fadeIn();
},
function(event) {
onclose: function(event) {
$('#not_connected').fadeIn();
}
);
});
}

function disconnect() {
Expand Down

0 comments on commit 45589db

Please sign in to comment.