Using jquery $.post shorthand ( http://api.jquery.com/jquery.post/ ), for example:
$(document).ready(function(){
$.post( "update.php", function( data ) {
// wrap this with the timeout, if you need
// but the method post is asynchronous already and takes time
$( ".update" ).hide();
});
});
The html:
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<button class="update">Update!</button>
</body>
</html>
That's all! Hope this helps!