jquery is not working over local network [migrated]
- by Kortyell Davis
i have a fedora server running apache web server. the server is connected to a home network. i have a laptop connected to the same network. i can enter the ip address of my server into the browser of my laptop and pull up the index.html file located in the document root directory of the fedora home server. the index.html file contains jquery code. the jquery code only works when i open it locally in my browser (e.g. right click open with firefox), but when i attempt to view the webpage from my laptop the jquery code is not executed.
the code is here below.
<script type="text/javascript" src="jquery-1.8.2.js"></script>
'
$(document).ready(function() {
$('#form').hide();
$('input[type=text]').focus(function() {
$(this).val('');
});
$('input[type=password]').focus(function() {
$(this).val('');
});
$('.form').hide();
$('#log').click(function(){
$('#form').toggle();
});
$('#reg').click(function(){
$('.form').toggle();
});
});