$(document).ready(function(){ $("#backButton").click(function(){ window.history.back(); }); });