jQuery: Global Delete Confirmation

You need to start with document ready of course, and include your jQuery script in your page as shown below, then adding a delete confirmation to any button is as easy as this: <script type="text/javascript" src="jQuery/jQuery-1.4.2.js"></script> $(document).ready(function(){   // here’s the magic: $(‘.delete’).click(function(){ // this will display a confirm (ok/cancel) pop-up box var result = [...]