JSFiddle - React, Tailwind, and code Playground

by Martin Sjåstad

JavaScript

events_table.$('.delete-event').on('click', function(e) {
		e.preventDefault();
		var $this = $(this);
		id = $this.data('id');
		$('<div title="Confirm Delete">Do you really want to delete this event?</div>').dialog({
			buttons: {
				"Ok": function() {
					window.location.href = '<?=  base_url() . "admin/event_delete/" ?>' + id;
				}
				,"Cancel": function() {
					$(this).dialog('destroy').remove();
				}
			},
			close: function(){
				$(this).dialog('destroy').remove();
			}
		});
	});