Skip to content

Instantly share code, notes, and snippets.

Created November 30, 2014 00:24
What would you like to do?
Chain jQuery Notifications Websockets Example
<!doctype html>
<script src=""></script>
<ul id="thashlist"></ul>
<script type="text/javascript">
$(function() {
var conn = new WebSocket("wss://");
conn.onopen = function (ev) {
var req = {type: "new-transaction", block_chain: "bitcoin"};
conn.onmessage = function (ev) {
var x = JSON.parse(;
var thash = x['payload']['transaction']['hash'];
$('#thashlist').append('<li>' + thash + '</li>');
Copy link

adv0r commented Jan 22, 2016

is this outdated now? I get a net::ERR_NAME_NOT_RESOLVED . Do you know how to achieve the same result?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment