HTML
<!doctype html>lang="en"charset="utf-8"name="viewport" content="width=device-width, initial-scale=1"jQuery UI Dialog popup - Default functionality with button clickrel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css"src="https://code.jquery.com/jquery-3.6.0.js"src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"Note: this is the example of how to use button jquery ui popup modelhow to set button okay and Cancel in jquery ui popup modelid="dialogBtn"Click button to open popupid="dialogBox" title="Basic dialog" style="display:none"This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.
CSS
JavaScript
$(function() {$("#dialogBtn").click(function(){$("#dialogBox").dialog({width: 330,height: "auto",autoOpen: true,dialogClass: "custom-ui-widget-header-warning",modal: true,responsive: true,position: {my: "center",at: "center",},buttons: {Cancel: function () {$(this).dialog("close");},Ok: function () {window.location.href = "https://agyanadda.com"; // add dynamic url},},}).dialog("open").prev().css("background", "#54ca68").css("color", "#fff");});