$(document).ready(function(){ $("#prevButton").click(function(){alert("You clicked the previous button.");}); });