Help with using the timeout function to set a delay

I’m trying to delay this line by 1 second, but can’t seem to figure out the syntax.

window.location.href="index.php?vid_id="+<?php echo $vid_id +1 ?>;

this is the entire function

$('#cancel').click(function() {
		    type: "POST",
		    url: "scripts/greenlight.php?vid_id="+<?php echo $vid_id ?>,
		    data: "vote=2",
		    success: function(){
			//window.location.href="index.php?vid_id="+<?php echo $vid_id +1 ?>
    			window.location.href="index.php?vid_id="+<?php echo $vid_id +1 ?>;
			}, 1000);
			}); // end click

Try it by 10 seconds instead - you should then be able to easily determine if what you’re doing works or not.