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>
<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();
});
});
</script>
You would need the file jquery-1.8.2.js in your root directory, or wherever the file containing the code is (on the server), and the following tags wrapping around the code.
Open Firebug or similar extensions and go to console to debug any other eventual problem with the code.