It depends if the header page was included before the code above was executed. So that it will not confuse you in selecting an html element, give an ID
to that element and access with it.
e.g
<input type = 'text' id = "txt1">
<button id = "btnId"><Click Me</button>
and access it via jquery with this
$(document).ready(function() {
$('#btnId').click(function() {
$('#txt1').html('This will appear to the textbox!');
});
});
If you have in internet connection, you can reference your jquery here so that you will not be confuse if where your jquery file was located.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>