{"id":167,"date":"2017-01-31T18:19:52","date_gmt":"2017-01-31T18:19:52","guid":{"rendered":"http:\/\/tommustester.wpengine.com\/?page_id=167"},"modified":"2017-01-31T18:19:52","modified_gmt":"2017-01-31T18:19:52","slug":"modals","status":"publish","type":"page","link":"https:\/\/cogs.iitgn.ac.in\/newcogs\/elements\/modals\/","title":{"rendered":"Elements &#8211; Modals"},"content":{"rendered":"<p>[vc_row full_width=&#8221;stretch_row&#8221;][vc_column]\n\t\t\t<section class=\"imagebg image--light cover cover-blocks bg--secondary \" >\n\t\t\t\t<div class=\"background-image-holder\"><img loading=\"lazy\" decoding=\"async\" width=\"2560\" height=\"1253\" src=\"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-scaled.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-scaled.jpg 2560w, https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-300x147.jpg 300w, https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-1024x501.jpg 1024w, https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-768x376.jpg 768w, https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-1536x752.jpg 1536w, https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-2048x1002.jpg 2048w, https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-content\/uploads\/2017\/01\/promo-1-600x294.jpg 600w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/div>\n\t\t\t\t<div class=\"container\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<div class=\"col-sm-6 col-md-5\">\n\t\t\t\t\t\t\t<div>[vc_column_text]<\/p>\n<h1>Modals<\/h1>\n<p class=\"lead\">These modular elements can be readily used and customized across pages and in different blocks.<\/p>\n<hr class=\"short\" \/>\n<p>Explore all of Stack&#8217;s modular elements<br \/>\nat the\u00a0<a href=\"\/elements\/\">Element Index Page \u2192<\/a>[\/vc_column_text]<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div><!--end of row-->\n\t\t\t\t<\/div><!--end of container-->\n\t\t\t\t\n\t\t\t<\/section>\n\t\t[\/vc_column][\/vc_row][vc_section css=&#8221;.vc_custom_1498220906182{padding-top: 0px !important;}&#8221;][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom: 30px !important;}&#8221;][vc_column width=&#8221;1\/2&#8243;][vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJhbGVydCUyMGJnLS1lcnJvciUyMiUzRSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUzQ2RpdiUyMGNsYXNzJTNEJTIyYWxlcnRfX2JvZHklMjIlM0UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0NzcGFuJTNFJTNDc3Ryb25nJTNFTm90ZSUzQSUzQyUyRnN0cm9uZyUzRSUyME1vZGFscyUyMGFyZSUyMG5vdyUyMGZ1bGx5JTIwY29tcGF0aWJsZSUyMHdpdGglMjBWYXJpYW50JTIwdGhhbmtzJTIwdG8lMjBvdXIlMjBuZXclMjBmcmVlJTIwcGx1Z2luJTJDJTIwU3RhY2slMjBNb2RhbHMuJTIwRm9yJTIwZGV0YWlscyUyMGFuZCUyMGRvd25sb2FkJTBBJTIwc2VlJTIwJTNDYSUyMGhyZWYlM0QlMjJodHRwJTNBJTJGJTJGd3d3LnRvbW11c3Job2R1cy5jb20lMkZmcmVlLXBsdWdpbi1zdGFjay1tb2RhbHMtc2ltcGxlLW1vZGFsLWV4dGVuc2lvbi1zdGFjay13b3JkcHJlc3MlMkYlMjIlM0V0aGlzJTIwYmxvZyUyMHBvc3QuJTNDJTJGYSUzRSUzQyUyRnNwYW4lM0UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0MlMkZkaXYlM0UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0NkaXYlMjBjbGFzcyUzRCUyMmFsZXJ0X19jbG9zZSUyMiUzRSVDMyU5NyUzQyUyRmRpdiUzRSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUzQyUyRmRpdiUzRQ==[\/vc_raw_html][vc_empty_space]<div class=\" boxed--lg bg--secondary  boxed boxed--border\" ><div class=\"container\">[vc_column_text]<\/p>\n<h4>Basic Modal<\/h4>\n<p>Modals in Stack are easy to set up and trigger from any element on the page. At their most basic usage, an element with class <strong>.modal-trigger<\/strong> inside the same <strong>.modal-instance<\/strong> triggers the modal to appear.[\/vc_column_text]<\/div><\/div>[\/vc_column][vc_column width=&#8221;1\/2&#8243; el_class=&#8221;xx&#8221;]\n\t\t<div class=\"modal-instance \">\n\t\t\t<a class=\"btn  modal-trigger\" href=\"#\">Trigger Modal<\/a>\n\t\t\t<div class=\"modal-container\"   >\n\t\t\t\t\n\t\t\t<div class=\"modal-content\">\n\t\t\t\t<div class=\"boxed boxed--lg\">\n\t\t\t\t\t[vc_column_text]<\/p>\n<h2>Here is a basic text modal<\/h2>\n<hr class=\"short\" \/>\n<p class=\"lead\">Stack&#8217;s visual style is simple yet distinct, making it an ideal starting point for your project whether it be a basic marketing site, or multi-page company presence.<\/p>\n<p>[\/vc_column_text]\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\n\t\t\t<\/div>\n\t\t<\/div><!--end of modal instance-->\n\t[\/vc_column][\/vc_row][\/vc_section][vc_section][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom: 30px !important;}&#8221;][vc_column width=&#8221;1\/2&#8243;]<div class=\" boxed--lg bg--secondary  boxed boxed--border\" ><div class=\"container\">[vc_column_text]<\/p>\n<h4>Autoshow Modal<\/h4>\n<p>Modals can be triggered automatically after a period of time once the page has been loaded by adding <strong>data-autoshow=&#8221;&#8221;<\/strong> to the <strong>.modal-container<\/strong> element. The attribute requires a numerical value in milliseconds, ie. a value of 1000 would show the modal 1 second after the page has loaded.<\/p>\n<p>[\/vc_column_text]<\/div><\/div>[\/vc_column][vc_column width=&#8221;1\/2&#8243;]\n\t\t<div class=\"modal-instance \">\n\t\t\t<a class=\"btn  modal-trigger\" href=\"#\">Trigger Modal<\/a>\n\t\t\t<div class=\"modal-container\" data-autoshow=\"1000\"  >\n\t\t\t\t\n\t\t\t<div class=\"modal-content\">\n\t\t\t\t<div class=\"boxed boxed--lg\">\n\t\t\t\t\t[vc_column_text]<\/p>\n<h2>Here is an autoshow modal<\/h2>\n<hr class=\"short\" \/>\n<p class=\"lead\">Stack&#8217;s visual style is simple yet distinct, making it an ideal starting point for your project whether it be a basic marketing site, or multi-page company presence.<\/p>\n<p>[\/vc_column_text]\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\n\t\t\t<\/div>\n\t\t<\/div><!--end of modal instance-->\n\t[\/vc_column][\/vc_row][\/vc_section][vc_section][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom: 30px !important;}&#8221;][vc_column width=&#8221;1\/2&#8243;]<div class=\" boxed--lg bg--secondary  boxed boxed--border\" ><div class=\"container\">[vc_column_text]<\/p>\n<h4>Cookies Enabled Modal<\/h4>\n<p>Adding attribute <strong>data-cookie<\/strong> to any modal container will make the modal a one-time modal. When the modal is dismissed, a browser cookie is set, and the modal is permanently dismissed. Any future page views will not show the modal. The cookie will suppress modals shown via triggers and via autoshow. The text set in the `data-cookie` modal will be used as the name for the cookie.<\/p>\n<p>The one-time modal is handy to alert users to a message which they can &#8220;accept&#8221; or &#8220;agree&#8221; to, such as an EU Cookies law notice, a promo\/sale or a newsletter signup offer.[\/vc_column_text]<\/div><\/div>[\/vc_column][vc_column width=&#8221;1\/2&#8243;][\/vc_column][\/vc_row][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom: 30px !important;}&#8221;][vc_column width=&#8221;1\/2&#8243;]<div class=\" boxed--lg bg--secondary  boxed boxed--border\" ><div class=\"container\">[vc_column_text]<\/p>\n<h4>Exit Modal<\/h4>\n<p>&#8220;Exit&#8221; modals can be used to draw the user&#8217;s attention to a promotion or any other alert when their mouse leaves a particular element on the page. Exit modals use the <strong>data-show-on-exit<\/strong> attribute to set a selector matching the element where the user&#8217;s mouse must exit to show the modal. This means that you could set this selector to match your &#8220;Check Out&#8221; button, the body of the page, or even a single section on your page so the modal shows when the user scrolls past it. You could also use an exit modal to draw attention back to the page when the user&#8217;s mouse leaves the browser window.[\/vc_column_text]<\/div><\/div>[\/vc_column][vc_column width=&#8221;1\/2&#8243;]<div class=\"element-to-exit boxed--lg bg--secondary  boxed boxed--border\" ><div class=\"container\">[vc_column_text]<\/p>\n<p>An &#8220;exit modal&#8221; will show immediately, each time your mouse leaves this box.<\/p>\n<p>[\/vc_column_text]<\/div><\/div>\n\t\t<div class=\"modal-instance \">\n\t\t\t<a class=\"btn  modal-trigger\" href=\"#\">Trigger Modal<\/a>\n\t\t\t<div class=\"modal-container\"   data-show-on-exit=\".element-to-exit\">\n\t\t\t\t\n\t\t\t<div class=\"modal-content\">\n\t\t\t\t<div class=\"boxed boxed--lg\">\n\t\t\t\t\t[vc_column_text]<\/p>\n<h2>This is an exit modal<\/h2>\n<hr class=\"short\" \/>\n<p class=\"lead\">With Stack, you can easily configure modals to appear when your user&#8217;s mouse leaves a specific element.<\/p>\n<p>[\/vc_column_text]\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t\n\t\t\t<\/div>\n\t\t<\/div><!--end of modal instance-->\n\t[\/vc_column][\/vc_row][\/vc_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[vc_row full_width=&#8221;stretch_row&#8221;][vc_column][\/vc_column][\/vc_row][vc_section css=&#8221;.vc_custom_1498220906182{padding-top: 0px !important;}&#8221;][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom: 30px !important;}&#8221;][vc_column width=&#8221;1\/2&#8243;][vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJhbGVydCUyMGJnLS1lcnJvciUyMiUzRSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUzQ2RpdiUyMGNsYXNzJTNEJTIyYWxlcnRfX2JvZHklMjIlM0UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0NzcGFuJTNFJTNDc3Ryb25nJTNFTm90ZSUzQSUzQyUyRnN0cm9uZyUzRSUyME1vZGFscyUyMGFyZSUyMG5vdyUyMGZ1bGx5JTIwY29tcGF0aWJsZSUyMHdpdGglMjBWYXJpYW50JTIwdGhhbmtzJTIwdG8lMjBvdXIlMjBuZXclMjBmcmVlJTIwcGx1Z2luJTJDJTIwU3RhY2slMjBNb2RhbHMuJTIwRm9yJTIwZGV0YWlscyUyMGFuZCUyMGRvd25sb2FkJTBBJTIwc2VlJTIwJTNDYSUyMGhyZWYlM0QlMjJodHRwJTNBJTJGJTJGd3d3LnRvbW11c3Job2R1cy5jb20lMkZmcmVlLXBsdWdpbi1zdGFjay1tb2RhbHMtc2ltcGxlLW1vZGFsLWV4dGVuc2lvbi1zdGFjay13b3JkcHJlc3MlMkYlMjIlM0V0aGlzJTIwYmxvZyUyMHBvc3QuJTNDJTJGYSUzRSUzQyUyRnNwYW4lM0UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0MlMkZkaXYlM0UlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlM0NkaXYlMjBjbGFzcyUzRCUyMmFsZXJ0X19jbG9zZSUyMiUzRSVDMyU5NyUzQyUyRmRpdiUzRSUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUzQyUyRmRpdiUzRQ==[\/vc_raw_html][vc_empty_space][\/vc_column][vc_column width=&#8221;1\/2&#8243; el_class=&#8221;xx&#8221;][\/vc_column][\/vc_row][\/vc_section][vc_section][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom: 30px !important;}&#8221;][vc_column width=&#8221;1\/2&#8243;][\/vc_column][vc_column width=&#8221;1\/2&#8243;][\/vc_column][\/vc_row][\/vc_section][vc_section][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom: 30px !important;}&#8221;][vc_column width=&#8221;1\/2&#8243;][\/vc_column][vc_column width=&#8221;1\/2&#8243;][\/vc_column][\/vc_row][vc_row css=&#8221;.vc_custom_1485825445121{margin-bottom:&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":33,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-167","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/pages\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/comments?post=167"}],"version-history":[{"count":0,"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/pages\/167\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/pages\/33"}],"wp:attachment":[{"href":"https:\/\/cogs.iitgn.ac.in\/newcogs\/wp-json\/wp\/v2\/media?parent=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}