Hello,
Yes, I had the same problem. First I'm using the latest jquey js without problem. The problem here is that the example is horrible:
<link rel="stylesheet" type="text/css" href="wmks-all.css" />
<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="jquery-ui.1.8.16.min.js"></script>
<script type="text/javascript" src="wmks.js" type="text/javascript"></script>
<script>
var wmks = WMKS.createWMKS("wmksContainer",{})
.register(WMKS.CONST.Events.CONNECTION_STATE_CHANGE, function(event,data){
if(data.state == cons.ConnectionState.CONNECTED)
{
console.log("connection state change : connected");
}
});
wmks.connect(“ws://127.0.0.1:8080”);
</script >
<div id=”wmksContainer” style=”position:absolute;width:100%;height:100%”></div>
WRONG!!!!!!!
The core is trying to create the canvas into the <div id=”wmksContainer” style=”position:absolute;width:100%;height:100%”></div> but when the script is being processed this div hasn't been created yet so...
you have to move the div before the script like this:
<link rel="stylesheet" type="text/css" href="wmks-all.css" />
<script type="text/javascript" src="jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="jquery-ui.1.8.16.min.js"></script>
<script type="text/javascript" src="wmks.js" type="text/javascript"></script>
<div id=”wmksContainer” style=”position:absolute;width:100%;height:100%”></div>
<script>
var wmks = WMKS.createWMKS("wmksContainer",{})
.register(WMKS.CONST.Events.CONNECTION_STATE_CHANGE, function(event,data){
if(data.state == cons.ConnectionState.CONNECTED)
{
console.log("connection state change : connected");
}
});
wmks.connect(“ws://127.0.0.1:8080”);
</script >
GOOOD!!!!
Now you are going to have another error with cons "if(data.state == cons.ConnectionState.CONNECTED)" cons doesn't exist.... great... so you can erase all the if or you can change cons.ConnectionState.CONNECTED to WMKS.CONST.ConnectionState.CONNECTED
I hope this helps!!!
Good luck!!!