I've spent many hours (days) searching for a solution and I've come up with no clear solution. I'm new to this so I might not know some basic procedures. I'm sure I'm making a very simple mistake hoping someone can help me out.
Basically I want to add text to an input field when you mouseover (or click) the submit button. I think the code is correct:
$(document).ready(function(){
$('input[name="submitButton" ').mouseenter(function(){
$('input[name="form[element0]" ').value($('input[name="form[element0]" ').value() + "extra text added") ;
});
});
What I think is the problem is that I can't modify the html directly with rapidweaver so I can't put the script source where I want it. I can only add things to the header, css, JavaScript tags, but nothing directly to the body. What happens is JavaScript gets loaded before the jQuery library. But i'm not sure if this is the problem or not.
This is added to the very bottom of the header:
<script type="text/javascript" src="jquery-1.10.1.min.js" ></script>
I've also made sure the file is in the correct folder.
Any ideas on whats wrong, if it's my code or if I'm just not setting things up correctly?
It turns out my solution to the problem was moving my code to the header with tags, and then add http:// to the front of my scr like so:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
More info here: http://forums.realmacsoftware.com/discussion/comment/248749#Comment_248749