document ready function function submit bind click function var str ad

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
$(document).ready(function() {
$(function() {
$('#submit').bind('click',function() {
var str = $("#add_proj_f").serialize();
$.get("ajax/comments.php?random=" + Math.random()*99999,
str,
function(data) {
$("#results").fadeIn();
$("#results").html(data);
}
);
});
});