I have code like the following for chat app using the socket.io
<htmL>
<head>
<title>Chat with socket.io and node.js</title>
<style>
#chat{
height:500px;
}
</style>
</head>
<body>
<div id="chat"></div>
<form id="send-message">
<input size="35" id="message"></input>
<input type="submit"></input>
</form>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="socket.io/socket.io.js"></script>
<script>
jQuery(function($){
var socket=io.connect();
var $messageForm=$('#send-message');
var $messageBox=$('#message');
var $chat=$('#chat');
$messageForm.submit(function(e){
e.preventDefault();
socket.emit('send message',$messageBox.val());
$messageBox.val('');
$messageBox.focus();
});
socket.on('new message',function(data){
$chat.append(data+"<br/>");
});
});
</script>
</body>
</html>
When i am running this it was working fine.
But when ever I change the jquery file with local sotred one it was not getting that file even it present there. Please solve me.
Code after modification
<script src="/jquery.min.js"></script>
<script src="socket.io/socket.io.js"></script>
How to include external js file here.