jQuery(document).ready(function($) { $('.action-button').on('click', function() { var action = $(this).data('action'); $.ajax({ url: 'https://flyingschool.nz/wp-admin/admin-ajax.php', method: 'POST', data: { action: action }, success: function(response) { // Handle the response here alert('Action performed: ' + action); }, error: function() { alert('Error performing action: ' + action); } }); }); }); Met Book - Flying School