{"id":1528,"date":"2014-11-05T14:17:07","date_gmt":"2014-11-05T12:17:07","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=1528"},"modified":"2018-06-20T17:17:16","modified_gmt":"2018-06-20T14:17:16","slug":"twitter-bootstrap-modal-example","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/","title":{"rendered":"Twitter Bootstrap Modal Example"},"content":{"rendered":"<p>The Bootstrap Modal is a responsive JavaScript popup used for many purposes, such as log in\/signup forms, videos, images and alert dialog boxes. It can even be used for showcasing dialog prompts for terms and conditions, and one of it&#8217;s best features is being responsive and customizable.<\/p>\n<p><strong>Modals&#8217; structure:<\/strong><\/p>\n<p>Theoretically, modals have a three-part structure, formed by a header, a body and a footer section; though you can&#8217;t really trigger a modal without a handle, which can be a button or a link.<\/p>\n<p>You might find yourself asking: <em>Can&#8217;t we go on without the handle?<\/em> The answer is actually a surprising yes, you can. But you won&#8217;t be able to trigger the modal, which by default stays hidden until triggered, so it&#8217;s pointless to write the code for it.<\/p>\n<p>In the header section, usually we only place the title of the modal, and maybe even a close button. In the body section we place whatever we wanted to showcase, be it terms and conditions, log in forms, videos, or even a single question. The footer section is where we usually place the button which take the user to the main page, or save changes or anything we want the user to do next.<\/p>\n<p><strong>We will use:<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/getbootstrap.com\/\" target=\"_blank\" rel=\"noopener\">Twitter&#8217;s Bootstrap<\/a><\/li>\n<\/ul>\n<p>[ulp id=&#8217;57DHuNTHJ2qczaGz&#8217;]<\/p>\n<h2>HTML markup for modals<\/h2>\n<p><strong>Linking and scripting <\/strong><\/p>\n<p>First of all,after creating an HTML file called <code>index.html<\/code> in our project&#8217;s directory, we have to give a name to our HTML document and link Bootstrap&#8217;s CSS file and script Bootstrap&#8217;s JavaScript file. So we put the name between the <code>&lt;title&gt; &lt;\/title&gt;<\/code> tags, and after it we place this code:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;css\/bootstrap.min.css&quot;&amp;gt;\r\n &amp;lt;script src=&quot;js\/bootstrap.min.js&quot;&amp;gt;&amp;lt;\/script&amp;gt;\r\n<\/pre>\n<p><strong>Trigger on the document&#8230;<\/strong><\/p>\n<p>Now we can go on with creating our modal. First we create the trigger button, which can be placed anywhere in the document&#8217;s body.The code will look like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&amp;lt;!-- Button trigger modal --&amp;gt;\r\n&amp;lt;button class=&quot;btn btn-primary btn-lg&quot; data-toggle=&quot;modal&quot; data-target=&quot;#myModal&quot;&amp;gt;\r\n    Launch modal\r\n&amp;lt;\/button&amp;gt;\r\n<\/pre>\n<p>You may have guessed by now that the class attribute just makes the trigger button look big and blue. You will see there that the button also has two other data attributes which are <code>data-toggle<\/code> and <code>data-target<\/code>. <code>data-toggle<\/code> is the one to tell the button what to toggle when the button is clicked (in our case it&#8217;s a modal), while <code>data-trigger<\/code> tells it which one to trigger as there can be multiple modals.<\/p>\n<p><strong>Where is my modal?<\/strong><\/p>\n<p>Time to tell the browser that I&#8217;m building a modal right in the place where I&#8217;ll place the following code snippet:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&amp;lt;div class=&quot;modal fade&quot; id=&quot;myModal&quot; tabindex=&quot;-1&quot; role=&quot;dialog&quot; aria-labelledby=&quot;myModalLabel&quot; aria-hidden=&quot;true&quot;&amp;gt;\r\n    &amp;lt;div class=&quot;modal-dialog&quot;&amp;gt;\r\n        &amp;lt;div class=&quot;modal-content&quot;&amp;gt;\r\n        &amp;lt;\/div&amp;gt;\r\n    &amp;lt;\/div&amp;gt;\r\n&amp;lt;\/div&amp;gt;\r\n<\/pre>\n<p>So let&#8217;s explain what we&#8217;ve written there:<\/p>\n<p>The class <code>modal fade<\/code> makes the modal fade into and out of view. The id which in our case has the attribute <code>myModal<\/code> should be the same as the id we placed in the button. You may even add a description to your modal by adding the <code>aria-describebdy<\/code> attribute. Furthermore, I&#8217;d like to address the issue of modals disappearing when the backdrop (back overlay area) is clicked. You can make this default property go away by adding <code>data-backdrop=\"static\"<\/code> as an attribute.<\/p>\n<p>The new guys in town are <code>aria-labelledby<\/code> and <code>aria-view<\/code>. These attributes are used to make the modal more accessible (you can learn more about web accessibility <a href=\"http:\/\/www.w3.org\/WAI\/intro\/accessibility.php\" target=\"_blank\" rel=\"noopener\">here<\/a>). The other classes you see are self-explanatory.<\/p>\n<p><strong>Let&#8217;s structure it!<\/strong><\/p>\n<p>Right after the <code>&lt;div class=\"modal-content\"&gt;<\/code> tag, we\u00a0place the whole code for the content, which is divided in three parts (remember the structure of a modal?): header, body and footer.<\/p>\n<p>You will find the code for the header looking like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&amp;lt;!-- Header--&amp;gt;\r\n&amp;lt;div class=&quot;modal-header&quot;&amp;gt;\r\n\t&amp;lt;button type=&quot;button&quot; class=&quot;close&quot; data-dismiss=&quot;modal&quot;&amp;gt;\r\n\t\t&amp;lt;span aria-hidden=&quot;true&quot;&amp;gt;&amp;amp;times;&amp;lt;\/span&amp;gt;\r\n\t\t&amp;lt;span class=&quot;sr-only&quot;&amp;gt;Close&amp;lt;\/span&amp;gt;\r\n\t&amp;lt;\/button&amp;gt;\r\n\t&amp;lt;h4 class=&quot;modal-title&quot; id=&quot;myModalLabel&quot;&amp;gt;Modal title&amp;lt;\/h4&amp;gt;\r\n&amp;lt;\/div&amp;gt;\r\n<\/pre>\n<p>While you already understand that the <code>&lt;h3&gt;<\/code> tag contains the title, you also have to know that the button represents the small typical X which closes the modal when clicked. The span element inside the button contains the icon and the hidden description for it&#8217;s function, when you hover your cursor over it.<\/p>\n<p>On to creating the body. After writing the code for the header, you write the code for the body, which should look something like this:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n &amp;lt;!-- Body --&amp;gt;\r\n &amp;lt;div class=&quot;modal-body&quot;&amp;gt;\r\n      Lorem ipsum ...\r\n &amp;lt;\/div&amp;gt;\r\n<\/pre>\n<p>The only thing you need to do is create a <code>&lt;div&gt;<\/code> element with the class <code>modal-body<\/code> and then do your thing.<\/p>\n<p>Just as simple is the code for the footer, which in itself is just a <code>&lt;div&gt;<\/code> element with a <code>modal-footer<\/code> class, containing two buttons, doing whatever you want them to do. In the following code snippet, the buttons just save changes or close the modal:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&amp;lt;!-- Footer --&amp;gt;\r\n&amp;lt;div class=&quot;modal-footer&quot;&amp;gt;\r\n        &amp;lt;button type=&quot;button&quot; class=&quot;btn btn-default&quot; data-dismiss=&quot;modal&quot;&amp;gt;Close&amp;lt;\/button&amp;gt;\r\n\t&amp;lt;button type=&quot;button&quot; class=&quot;btn btn-primary&quot;&amp;gt;Save changes&amp;lt;\/button&amp;gt;\r\n&amp;lt;\/div&amp;gt;\r\n<\/pre>\n<p>And that&#8217;s it. You can now see your modal.<\/p>\n<p>But&#8230;<\/p>\n<h2>It doesn&#8217;t work!<\/h2>\n<p>If you wrote the code being really careful, or even copy-pasted it and your modal still won&#8217;t show, then you&#8217;re as unlucky as me (and many others). There are some cases that the modal just won&#8217;t show. This can be for two reasons.<\/p>\n<p>The first is that <code>boostrap.min.js<\/code> doesn&#8217;t work properly without jQuery, which can be solved by adding this part of code before <code>bootstrap.min.js<\/code>:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n  &amp;lt;script src=&quot;\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.10.1\/jquery.min.js&quot;&amp;gt;&amp;lt;\/script&amp;gt;\r\n  &amp;lt;script src=&quot;\/\/ajax.googleapis.com\/ajax\/libs\/jqueryui\/1.10.3\/jquery-ui.min.js&quot;&amp;gt;&amp;lt;\/script&amp;gt;\r\n<\/pre>\n<p>If it still doesn&#8217;t work then the problem is with your version of Bootstrap: some versions&#8217; <code>hide<\/code> class has the property <code>display: none;<\/code> which makes your modal disappear. To fix that you can instead use the custom class <code>hide-block<\/code> with this code:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.hide-block{\r\n    display: none;\r\n}\r\n<\/pre>\n<p>Now your modal is up and running, and looking like this:<\/p>\n<figure id=\"attachment_1550\" aria-describedby=\"caption-attachment-1550\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled.jpg\"><img decoding=\"async\" class=\"size-full wp-image-1550\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled.jpg\" alt=\"Modal created with Twitter's Bootstrap\" width=\"640\" height=\"400\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled.jpg 640w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled-300x187.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><figcaption id=\"caption-attachment-1550\" class=\"wp-caption-text\">Modal created with Twitter&#8217;s Bootstrap<\/figcaption><\/figure>\n<h2>Customize your modal<\/h2>\n<p>You are now able to create a modal with basic properties, but we&#8217;ll show you more: CUSTOMIZING. You can make your modal multifunctional and fancy. Here&#8217;s how:<\/p>\n<p><strong>Changing it&#8217;s size<\/strong><br \/>\nModals have two available classes: large and small. You can activate them by placing modifier classes on the <code>modal-dialog<\/code> class. The modifier classes in question would be <code>modal-lg<\/code> and <code>modal-sm<\/code>.<\/p>\n<p><strong>Removing animation<\/strong><br \/>\nBy default, modals appear by fading into the view. You can remove this animation by simply removing the <code>fade<\/code> class from your modal markup.<\/p>\n<p>Cool, huh?! Now on to even cooler stuff!<\/p>\n<p><strong>Embedding Youtube videos<\/strong><\/p>\n<p>We mentioned earlier that you can use modals to showcase videos. If I want to embed a Youtube video, <em>how<\/em> exactly do I do that? Here&#8217;s how:<\/p>\n<p>As I&#8217;ll be building a modal that plays the video as soon as it is triggered, I will be adding this attribute to the launch button:<br \/>\n<code>data-theVideo=\"http:\/\/www.youtube.com\/embed\/loFtozxZG0s\" <\/code>.<br \/>\nThen we place this code in the modal&#8217;s body:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&amp;lt;iframe width=&quot;100%&quot; height=&quot;350&quot; src=&quot;&quot;&amp;gt;&amp;lt;\/iframe&amp;gt;<\/pre>\n<p>And then we script the function to get and autoplay the video from Datatag, and also the function call like this:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&amp;lt;script&amp;gt;\r\n    \/\/function to get and autoplay youtube video from datatag:\r\n    function autoPlayYouTubeModal(){\r\n        var trigger = $(&quot;body&quot;).find('&#x5B;data-toggle=&quot;modal&quot;]');\r\n        trigger.click(function() {\r\n            var theModal = $(this).data( &quot;target&quot; ),\r\n                    videoSRC = $(this).attr( &quot;data-theVideo&quot; ),\r\n                    videoSRCauto = videoSRC+&quot;?autoplay=1&quot; ;\r\n            $(theModal+' iframe').attr('src', videoSRCauto);\r\n            $(theModal+' button.close').click(function () {\r\n                $(theModal+' iframe').attr('src', videoSRC);\r\n            });\r\n        });\r\n    }\r\n    \/\/the function call:\r\n\r\n            $(document).ready(function(){\r\n                autoPlayYouTubeModal();\r\n            });\r\n&amp;lt;\/script&amp;gt;\r\n<\/pre>\n<p>That is, if you&#8217;re as lazy as me you can script it like that. If you&#8217;re not, you can place the code in a different file, and just script the file.This is what you get:<\/p>\n<figure id=\"attachment_1552\" aria-describedby=\"caption-attachment-1552\" style=\"width: 860px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled1.jpg\"><img decoding=\"async\" class=\"size-full wp-image-1552\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled1.jpg\" alt=\"YouTube video embedded in modal\" width=\"860\" height=\"600\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled1.jpg 860w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Untitled1-300x209.jpg 300w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><figcaption id=\"caption-attachment-1552\" class=\"wp-caption-text\">YouTube video embedded in modal<\/figcaption><\/figure>\n<p><strong>Using JavaScript<\/strong><\/p>\n<p>Call a modal with id myModal with a single line of JavaScript:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$('#myModal').modal(options)\r\n<\/pre>\n<p>Same as with calling modals, you can do a number of actions on modals using JavaScript. Some of the most important are toggle, show and hide.<\/p>\n<p>Now you can go and conquer the Twitter Bootstrap&#8217;s modal.<\/p>\n<h2>Download the source code for Modals<\/h2>\n<p>This was an example of Modals using Twitter&#8217;s Bootstrap.<\/p>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the source code for this example here: <strong><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/Modals.zip\">Modals<\/a> <\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Bootstrap Modal is a responsive JavaScript popup used for many purposes, such as log in\/signup forms, videos, images and alert dialog boxes. It can even be used for showcasing dialog prompts for terms and conditions, and one of it&#8217;s best features is being responsive and customizable. Modals&#8217; structure: Theoretically, modals have a three-part structure, &hellip;<\/p>\n","protected":false},"author":25,"featured_media":8515,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[284],"tags":[],"class_list":["post-1528","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bootstrap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Twitter Bootstrap Modal Example - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about bootstrap modal? Check out our Tutorial where we will use JavaScript to Call a modal and then you can go and conquer the Twitter!\" \/>\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\/css\/bootstrap\/twitter-bootstrap-modal-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Twitter Bootstrap Modal Example - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about bootstrap modal? Check out our Tutorial where we will use JavaScript to Call a modal and then you can go and conquer the Twitter!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-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:author\" content=\"https:\/\/www.facebook.com\/era.balliu.7\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-05T12:17:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-20T14:17:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-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=\"Era Balliu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BalliuEra\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Era Balliu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/\"},\"author\":{\"name\":\"Era Balliu\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e\"},\"headline\":\"Twitter Bootstrap Modal Example\",\"datePublished\":\"2014-11-05T12:17:07+00:00\",\"dateModified\":\"2018-06-20T14:17:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/\"},\"wordCount\":1652,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg\",\"articleSection\":[\"Bootstrap\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/\",\"name\":\"Twitter Bootstrap Modal Example - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg\",\"datePublished\":\"2014-11-05T12:17:07+00:00\",\"dateModified\":\"2018-06-20T14:17:16+00:00\",\"description\":\"Interested to learn about bootstrap modal? Check out our Tutorial where we will use JavaScript to Call a modal and then you can go and conquer the Twitter!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/css\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Bootstrap\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/css\/bootstrap\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Twitter Bootstrap Modal 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\/c27ecf40c810e6396ba93ffb829c7b0e\",\"name\":\"Era Balliu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g\",\"caption\":\"Era Balliu\"},\"description\":\"Era is a Telecommunications Engineering student, with a great passion for new technologies. Up until now she has been coding with HTML\/CSS, Bootstrap and other front-end coding languages and frameworks, and her recent love is Angular JS.\",\"sameAs\":[\"http:\/\/www.webcodegeeks.com\/\",\"https:\/\/www.facebook.com\/era.balliu.7\",\"https:\/\/www.instagram.com\/eraballiu\/\",\"https:\/\/www.linkedin.com\/in\/eraballiu\",\"https:\/\/www.pinterest.com\/001r2gw0jt0ln6d\/\",\"https:\/\/x.com\/BalliuEra\",\"https:\/\/www.youtube.com\/c\/eraballiu\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/era-balliu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Twitter Bootstrap Modal Example - Web Code Geeks - 2026","description":"Interested to learn about bootstrap modal? Check out our Tutorial where we will use JavaScript to Call a modal and then you can go and conquer the Twitter!","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\/css\/bootstrap\/twitter-bootstrap-modal-example\/","og_locale":"en_US","og_type":"article","og_title":"Twitter Bootstrap Modal Example - Web Code Geeks - 2026","og_description":"Interested to learn about bootstrap modal? Check out our Tutorial where we will use JavaScript to Call a modal and then you can go and conquer the Twitter!","og_url":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/era.balliu.7","article_published_time":"2014-11-05T12:17:07+00:00","article_modified_time":"2018-06-20T14:17:16+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg","type":"image\/jpeg"}],"author":"Era Balliu","twitter_card":"summary_large_image","twitter_creator":"@BalliuEra","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Era Balliu","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/"},"author":{"name":"Era Balliu","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c27ecf40c810e6396ba93ffb829c7b0e"},"headline":"Twitter Bootstrap Modal Example","datePublished":"2014-11-05T12:17:07+00:00","dateModified":"2018-06-20T14:17:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/"},"wordCount":1652,"commentCount":6,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg","articleSection":["Bootstrap"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/","url":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/","name":"Twitter Bootstrap Modal Example - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg","datePublished":"2014-11-05T12:17:07+00:00","dateModified":"2018-06-20T14:17:16+00:00","description":"Interested to learn about bootstrap modal? Check out our Tutorial where we will use JavaScript to Call a modal and then you can go and conquer the Twitter!","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/11\/bootstrap-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/css\/bootstrap\/twitter-bootstrap-modal-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"CSS","item":"https:\/\/www.webcodegeeks.com\/category\/css\/"},{"@type":"ListItem","position":3,"name":"Bootstrap","item":"https:\/\/www.webcodegeeks.com\/category\/css\/bootstrap\/"},{"@type":"ListItem","position":4,"name":"Twitter Bootstrap Modal 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\/c27ecf40c810e6396ba93ffb829c7b0e","name":"Era Balliu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f6adddf7eada210f682608fea9d8159441369ec622998a5851a447e0a2bfa3f3?s=96&d=mm&r=g","caption":"Era Balliu"},"description":"Era is a Telecommunications Engineering student, with a great passion for new technologies. Up until now she has been coding with HTML\/CSS, Bootstrap and other front-end coding languages and frameworks, and her recent love is Angular JS.","sameAs":["http:\/\/www.webcodegeeks.com\/","https:\/\/www.facebook.com\/era.balliu.7","https:\/\/www.instagram.com\/eraballiu\/","https:\/\/www.linkedin.com\/in\/eraballiu","https:\/\/www.pinterest.com\/001r2gw0jt0ln6d\/","https:\/\/x.com\/BalliuEra","https:\/\/www.youtube.com\/c\/eraballiu"],"url":"https:\/\/www.webcodegeeks.com\/author\/era-balliu\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1528","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\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1528"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/1528\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/8515"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}