jQuery .load function
jQuery .load function
All I am trying to do is load stuff from form.php which has this code in it:
-
<div>
<label for="name">Name</label>
<input name="name" type="text" />
</div>
<div>
<label for="email">Email</label>
<input name="email" type="text" />
</div>
<div>
<label for="comment">Comment</label>
<textarea name="comment" id="comment" cols="30" rows="5"></textarea>
</div>
<div>
<input class="submit" type="submit" value="Rock & Roll" />
</div>
This is the jQuery code I am using, but when i click the h3 with the id of "postcomment" nothing happens at all.
-
$(document).ready(function(){
$("#postcomment").click(function(){
document.getElementById("leavecomment").style.display = "block";
$("#comment_form").load("/form.php");
});
});
If anyone can tell me what the deal is i'd appreciate it. Thanks