{"id":2543,"date":"2015-03-04T13:15:12","date_gmt":"2015-03-04T11:15:12","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=2543"},"modified":"2018-06-19T09:54:20","modified_gmt":"2018-06-19T06:54:20","slug":"jquery-dialog-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/","title":{"rendered":"jQuery dialog example"},"content":{"rendered":"<p><strong>EDITORIAL NOTE<\/strong>: In this post, we feature a jQuery dialog example. A dialog is a floating window that contains a title bar and a content area. The dialog window can be moved, resized and closed with the &#8216;x&#8217; icon by default.<\/p>\n<p>jQuery UI is a collection of jQuery plugins used to enhance the web application user interface. Inside this library we find many reusable components for interactions, effects, widgets and more.<\/p>\n<p>[ulp id=&#8217;qGGDqWnle19VavkM&#8217;]<\/p>\n<blockquote><p><em>jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you&#8217;re building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice. <a title=\"http:\/\/jqueryui.com\/\" href=\"http:\/\/jqueryui.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/jqueryui.com\/<\/a><\/em><\/p><\/blockquote>\n<h2>What is the jQuery Dialog<\/h2>\n<p>jQuery Dialog is a powerful JavaScript popup window built-in the jQuery user interface library (<a title=\"jQuery ui\" href=\"http:\/\/jqueryui.com\/\" target=\"_blank\" rel=\"noopener\">jQuery ui<\/a>) and it&#8217;s mostly used to show an alert message box or simple html forms such as log in\/signup forms. The dialog box is mainly composed from two section, header and body but it&#8217;s also fully customizable to allow developers makes own structure.<\/p>\n<p>In this example, I will introduce different uses of this overlay, starting with a Hello World example.<\/p>\n<h3>1. Hello World dialog<\/h3>\n<p>First, you need to download the jQuery and jQuery ui libraries from <a title=\"Download jQuery\" href=\"http:\/\/jquery.com\/download\/\" target=\"_blank\" rel=\"noopener\">here<\/a> and <a title=\"Download jQuery ui\" href=\"http:\/\/jqueryui.com\/download\/\" target=\"_blank\" rel=\"noopener\">here<\/a> or use one of CDNs provided on the jQuery Website.<br \/>\nCreate an empty HTML file and put into the code like the following:<\/p>\n<pre class=\"brush: xml; highlight: [6,9]; title: ; notranslate\" title=\"\">\r\n&lt;!doctype html&gt;\r\n&lt;html lang=&quot;en&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;utf-8&quot;&gt;\r\n&lt;title&gt;jQuery Dialog Example - Hello World!&lt;\/title&gt;\r\n&lt;!-- todo: add scripts and css --&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;!-- todo: add html anchor and div to show dialog --&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Now put the scripts and style references between the <code>head<\/code> tags.<\/p>\n<pre class=\"brush: xml; highlight: [6,7,8]; title: ; notranslate\" title=\"\">\r\n&lt;!doctype html&gt;\r\n&lt;html lang=&quot;en&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;utf-8&quot;&gt;\r\n&lt;title&gt;jQuery Dialog Example - Hello World!&lt;\/title&gt;\r\n  &lt;link href=&quot;jquery-ui.css&quot; rel=&quot;stylesheet&quot;&gt;\r\n  &lt;img src=&quot;data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7&quot; data-wp-preserve=&quot;%3Cscript%20src%3D%22jquery.js%22%3E%3C%2Fscript%3E&quot; data-mce-resize=&quot;false&quot; data-mce-placeholder=&quot;1&quot; class=&quot;mce-object&quot; width=&quot;20&quot; height=&quot;20&quot; alt=&quot;&amp;lt;script&amp;gt;&quot; title=&quot;&amp;lt;script&amp;gt;&quot; \/&gt;\r\n  &lt;img src=&quot;data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7&quot; data-wp-preserve=&quot;%3Cscript%20src%3D%22jquery-ui.js%22%3E%3C%2Fscript%3E&quot; data-mce-resize=&quot;false&quot; data-mce-placeholder=&quot;1&quot; class=&quot;mce-object&quot; width=&quot;20&quot; height=&quot;20&quot; alt=&quot;&amp;lt;script&amp;gt;&quot; title=&quot;&amp;lt;script&amp;gt;&quot; \/&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;!-- todo: add html anchor and div to show dialog --&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Your page is now ready, let&#8217;s add some code to run the hello world dialog.<\/p>\n<p>I will create between the <code>body<\/code> tags a <code>DIV<\/code> element with <code>id=\"MyDialog\"<\/code>, this <code>id<\/code> is used in the selector to apply the <code>dialog()<\/code> event. Also, I will add to this <code>DIV<\/code> the <code>title<\/code> attribute that should be showed as Dialog header.<\/p>\n<p>By default <code>dialog()<\/code> has the property <code>autoOpen<\/code> set to <code>true<\/code>, so I want to set it <code>false<\/code> then add a button to lunch the dialog. The full code will be:<\/p>\n<p><span style=\"text-decoration: underline;\"><em>index.html<\/em><\/span><\/p>\n<pre class=\"brush: xml; highlight: [10,11,12,13,14,15,16,17,18,19]; title: ; notranslate\" title=\"\">\r\n&lt;!doctype html&gt;\r\n&lt;html lang=&quot;en&quot;&gt;\r\n&lt;head&gt;\r\n&lt;meta charset=&quot;utf-8&quot;&gt;\r\n&lt;title&gt;jQuery Dialog Example - Hello World!&lt;\/title&gt;\r\n  &lt;link href=&quot;jquery-ui.css&quot; rel=&quot;stylesheet&quot;&gt;\r\n  &lt;img src=&quot;data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7&quot; data-wp-preserve=&quot;%3Cscript%20src%3D%22jquery.js%22%3E%3C%2Fscript%3E&quot; data-mce-resize=&quot;false&quot; data-mce-placeholder=&quot;1&quot; class=&quot;mce-object&quot; width=&quot;20&quot; height=&quot;20&quot; alt=&quot;&amp;lt;script&amp;gt;&quot; title=&quot;&amp;lt;script&amp;gt;&quot; \/&gt;\r\n  &lt;img src=&quot;data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7&quot; data-wp-preserve=&quot;%3Cscript%20src%3D%22jquery-ui.js%22%3E%3C%2Fscript%3E&quot; data-mce-resize=&quot;false&quot; data-mce-placeholder=&quot;1&quot; class=&quot;mce-object&quot; width=&quot;20&quot; height=&quot;20&quot; alt=&quot;&amp;lt;script&amp;gt;&quot; title=&quot;&amp;lt;script&amp;gt;&quot; \/&gt;\r\n  &lt;img src=&quot;data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7&quot; data-wp-preserve=&quot;%3Cscript%3E%0A%20%20%24(function()%20%7B%0A%20%20%20%20%2F%2F%20Apply%20dialog%20to%20MyDialog%20id%0A%20%20%20%20%24(%20%22%23MyDialog%22%20).dialog(%7B%0A%20%20%20%20%20%20autoOpen%3A%20false%2C%0A%20%20%20%20%7D)%3B%0A%20%20%20%20%2F%2F%20Attach%20a%20click%20event%20to%20the%20button%20with%20id%20openDialog%0A%20%20%20%20%24(%20%22%23openDialog%22%20).click(function()%20%7B%0A%20%20%20%20%20%20%24(%20%22%23MyDialog%22%20).dialog(%20%22open%22%20)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D)%3B%0A%20%20%3C%2Fscript%3E&quot; data-mce-resize=&quot;false&quot; data-mce-placeholder=&quot;1&quot; class=&quot;mce-object&quot; width=&quot;20&quot; height=&quot;20&quot; alt=&quot;&amp;lt;script&amp;gt;&quot; title=&quot;&amp;lt;script&amp;gt;&quot; \/&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n\r\n\r\n\r\n&lt;div id=&quot;MyDialog&quot; title=&quot;Hello World dialog&quot;&gt;\r\n  \r\n\r\nThis is My Hello World dialog.\r\n\r\n&lt;\/div&gt;\r\n\r\n\r\n\r\n\r\n&lt;!-- Button lunch dialog --&gt;\r\n&lt;button id=&quot;openDialog&quot;&gt;Click  me&lt;\/button&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>The result of this example is:<\/p>\n<figure id=\"attachment_2602\" aria-describedby=\"caption-attachment-2602\" style=\"width: 846px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/02\/jQuery-Dialog-Example-Hello-World2.png\"><img decoding=\"async\" class=\"size-full wp-image-2602\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/02\/jQuery-Dialog-Example-Hello-World2.png\" alt=\"jQuery Dialog Example - Hello World\" width=\"846\" height=\"405\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/02\/jQuery-Dialog-Example-Hello-World2.png 846w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/02\/jQuery-Dialog-Example-Hello-World2-300x144.png 300w\" sizes=\"(max-width: 846px) 100vw, 846px\" \/><\/a><figcaption id=\"caption-attachment-2602\" class=\"wp-caption-text\">jQuery Dialog Example &#8211; Hello World<\/figcaption><\/figure>\n<h3>2. Advanced dialog example<\/h3>\n<p>Repeating same steps as above, but this time, I will replace the script section by the following code:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n  $(function() {\r\n    $( &quot;#MyDialog&quot; ).dialog({\r\n      autoOpen: false,\r\n      resizable: false, \/\/ prevent resize of the dialog\r\n      height:250, \/\/ set the height to 250px\r\n      modal: true, \/\/ show a modal overlay in background\r\n      buttons: {\r\n        &quot;Save&quot;: function() {\r\n\t\t  \/\/ do your business code here\r\n\t\t  alert(&quot;you've press save&quot;);\r\n          $( this ).dialog( &quot;close&quot; );\r\n        },\r\n        Cancel: function() {\r\n          $( this ).dialog( &quot;close&quot; );\r\n        }\r\n      }\r\n    });\r\n\t\r\n    $( &quot;#openDialog&quot; ).click(function() {\r\n      $( &quot;#MyDialog&quot; ).dialog( &quot;open&quot; );\r\n    });\r\n  });\r\n<\/pre>\n<p>As you see, the function <code>dialog()<\/code> take new options. The option <code>resizable<\/code> is used to allow or prevent dialog resizing. I&#8217;ve fixed the dialog <code>height<\/code> to 250px. The <code>modal<\/code> option is very important in case we need to focused user attention on the alert box, an overlay background is shown behind the dialog that make the box more attractive.<\/p>\n<p>Among these options, I&#8217;ve also defined the <code>buttons<\/code> option that declare 2 buttons for this dialog and we can assign a callback function on each one.<\/p>\n<p>We can do more advanced scripts with the <code>dialog<\/code> jQuery plugin. Now, I advise you to read carefully the examples and try coding from scratch.<\/p>\n<h2>Download the source code for dialog<\/h2>\n<p>This was an example of jQuery Dialog.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/02\/jQuery_Dialog_Example_Source_Code.zip\"><strong>jQueryDialogExamples<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>EDITORIAL NOTE: In this post, we feature a jQuery dialog example. A dialog is a floating window that contains a title bar and a content area. The dialog window can be moved, resized and closed with the &#8216;x&#8217; icon by default. jQuery UI is a collection of jQuery plugins used to enhance the web application &hellip;<\/p>\n","protected":false},"author":58,"featured_media":919,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[],"class_list":["post-2543","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>jQuery dialog example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about jQuery dialog? Then check out our example where we will introduce you different uses of this overlay, starting with a Hello World.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"jQuery dialog example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about jQuery dialog? Then check out our example where we will introduce you different uses of this overlay, starting with a Hello World.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-03-04T11:15:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-19T06:54:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rami Tayba\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rami Tayba\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/\"},\"author\":{\"name\":\"Rami Tayba\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0e396cc2123832350fac098b7d861d29\"},\"headline\":\"jQuery dialog example\",\"datePublished\":\"2015-03-04T11:15:12+00:00\",\"dateModified\":\"2018-06-19T06:54:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/\"},\"wordCount\":1174,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"articleSection\":[\"jQuery\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/\",\"name\":\"jQuery dialog example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"datePublished\":\"2015-03-04T11:15:12+00:00\",\"dateModified\":\"2018-06-19T06:54:20+00:00\",\"description\":\"Interested to learn about jQuery dialog? Then check out our example where we will introduce you different uses of this overlay, starting with a Hello World.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"jQuery\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jQuery dialog example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0e396cc2123832350fac098b7d861d29\",\"name\":\"Rami Tayba\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3a79461c791099d87bb3b8bc979f3a9e844f9f950d1a70efb24d5a8af4490ce1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3a79461c791099d87bb3b8bc979f3a9e844f9f950d1a70efb24d5a8af4490ce1?s=96&d=mm&r=g\",\"caption\":\"Rami Tayba\"},\"description\":\"Rami Tayba is a Software Engineer graduated from Lebanese University, he is experienced in web development and IT project management. During his experience, he was leading various teams and has been involved into many large projects from analysis and design to implementation.\",\"sameAs\":[\"http:\/\/ramitayba.tk\/\",\"http:\/\/www.linkedin.com\/pub\/rami-tayba\/34\/231\/415\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/rami-tayba\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"jQuery dialog example - Web Code Geeks - 2026","description":"Interested to learn about jQuery dialog? Then check out our example where we will introduce you different uses of this overlay, starting with a Hello World.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/","og_locale":"en_US","og_type":"article","og_title":"jQuery dialog example - Web Code Geeks - 2026","og_description":"Interested to learn about jQuery dialog? Then check out our example where we will introduce you different uses of this overlay, starting with a Hello World.","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2015-03-04T11:15:12+00:00","article_modified_time":"2018-06-19T06:54:20+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","type":"image\/jpeg"}],"author":"Rami Tayba","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Rami Tayba","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/"},"author":{"name":"Rami Tayba","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0e396cc2123832350fac098b7d861d29"},"headline":"jQuery dialog example","datePublished":"2015-03-04T11:15:12+00:00","dateModified":"2018-06-19T06:54:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/"},"wordCount":1174,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","articleSection":["jQuery"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/","name":"jQuery dialog example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","datePublished":"2015-03-04T11:15:12+00:00","dateModified":"2018-06-19T06:54:20+00:00","description":"Interested to learn about jQuery dialog? Then check out our example where we will introduce you different uses of this overlay, starting with a Hello World.","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/jquery-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/jquery\/jquery-dialog-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"jQuery","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/jquery\/"},{"@type":"ListItem","position":4,"name":"jQuery dialog example"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/0e396cc2123832350fac098b7d861d29","name":"Rami Tayba","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3a79461c791099d87bb3b8bc979f3a9e844f9f950d1a70efb24d5a8af4490ce1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3a79461c791099d87bb3b8bc979f3a9e844f9f950d1a70efb24d5a8af4490ce1?s=96&d=mm&r=g","caption":"Rami Tayba"},"description":"Rami Tayba is a Software Engineer graduated from Lebanese University, he is experienced in web development and IT project management. During his experience, he was leading various teams and has been involved into many large projects from analysis and design to implementation.","sameAs":["http:\/\/ramitayba.tk\/","http:\/\/www.linkedin.com\/pub\/rami-tayba\/34\/231\/415"],"url":"https:\/\/www.webcodegeeks.com\/author\/rami-tayba\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/2543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/58"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=2543"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/2543\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/919"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=2543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=2543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=2543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}