Not all code is working- why not?
Anyone see anything wrong with this code?
It prevents normal link click, posts to approve.php, and adds the css border. But it does not replace the .row's or #msg's html.
I'm pretty certain my objects are selected correctly. Any ideas?
- $(document).ready(function() {
$("input").click(function(e){
// stop normal link click
e.preventDefault();
// send request
$.post("approve.php", { submit: $(this).val(), hash: $(this).attr('id')}, function(xml) {
// format and output result
$(this).parents(".row").html("<td colspan=5>It worked</td>");
$("#msg").html("<p>One Did</p>");
});
});
$("input").css("border", "1px solid black");
});