Mostrando todos 1 Resultados
Filter
{"id":2459343913018,"title":"Be HumanKIND Kids","handle":"be-humankind-nino","description":"\u003ch5\u003ePlantamos un árbol por cada producto\u003c\/h5\u003e\n\u003cimg height=\"984\" width=\"551\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0012\/7287\/3018\/t\/4\/assets\/info_ROPA_Green_Hug.png?v=1592417502\"\u003e\n\u003cdiv aria-hidden=\"true\" role=\"dialog\" class=\"modal modal__bg\" id=\"modal\"\u003e\n\u003cdiv class=\"modal__dialog\"\u003e\n\u003cdiv class=\"modal__content\"\u003e\n\u003cimg alt=\"\" src=\"\/\/cdn.shopify.com\/s\/files\/1\/0012\/7287\/3018\/t\/4\/assets\/nino.png?767\" style=\"height: 400px;\"\u003e \u003ca class=\"modal__close demo-close\"\u003e \u003csvg viewbox=\"0 0 24 24\" class=\"\"\u003e \u003cpath d=\"M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z\"\u003e\u003c\/path\u003e \u003cpath fill=\"none\" d=\"M0 0h24v24h-24z\"\u003e\u003c\/path\u003e \u003c\/svg\u003e \u003c\/a\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cstyle media=\"screen\"\u003e\u003c!--\n@media (max-width: 590px) {\n .modal__content img{\n height: 180px !important;\n}\n }\n\n.modal {\n will-change: visibility, opacity;\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 1000;\n visibility: hidden;\n opacity: 0;\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);\ntext-align: center !important;\n}\n.modal--active {\n visibility: visible;\n opacity: 1;\n}\n.modal--align-top {\n align-items: flex-start;\n}\n.modal__bg {\n background: transparent;\n}\n.modal__dialog {\n max-width: 800px;\n padding: 1.2rem;\n text-align: center !important;\n}\n.modal__content {\n will-change: transform, opacity;\n position: relative;\n padding: 2.4rem !important;\n background: white;\n background-clip: padding-box;\n box-shadow: 0 12px 15px 0 rgba(0,0,0,0.25);\n opacity: 0;\n transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);\ntext-align: center !important;\n}\n.modal__content--active {\n opacity: 1;\n}\n.modal-text{\nborder: 1px solid red;\n}\n.modal__close {\n z-index: 1100;\n cursor: pointer;\n}\n.modal__trigger {\n position: relative;\n display: inline-block;\n margin: 1 auto;\n padding: 1.2rem 2.4rem;\n color: white;\n background-color: #a9bb18;\n line-height: 1;\n cursor: pointer;\n box-shadow: 0 2px 5px 0 rgba(0,0,0,0.26);\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n border-radius:25px;\n position: relative; left: 50% !important;\ntransform: translateX(-50%) !important;\n}\n.modal__trigger p{\npadding-top:20px;\n}\n\n.modal__trigger--active {\n z-index: 10;\n}\n\n#modal__temp {\n will-change: transform, opacity;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: white;\n -webkit-transform: none;\n transform: none;\n opacity: 1;\n transition: opacity 0.1s ease-out, -webkit-transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n transition: opacity 0.1s ease-out, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n transition: opacity 0.1s ease-out, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n}\n\n.demo-btns header {\n padding: 7vh 10vw;\n background: #ffebee;\n display: flex;\n align-items: center;\n}\n.demo-btns header h1 {\n margin: 0;\n color: rgba(0,0,0,0.54);\n font-weight: 300;\n}\n.demo-btns .info {\n background: #f44336;\n padding: 3vh 10vw;\n height: 70vh;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-flow: column wrap;\n}\n@media (max-width: 700px) {\n .modal__content br{\n display: none !important;\n}\n\n}\n.demo-close {\n position: absolute;\n top: 0;\n right: 0;\n margin: 1.2rem;\n padding: 0.6rem;\n background: rgba(0,0,0,0.3);\n border-radius: 50%;\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n}\n.demo-close svg {\n width: 24px;\n fill: #fff;\n pointer-events: none;\n vertical-align: top;\n}\n.demo-close:hover {\n background: rgba(0,0,0,0.6);\n}\n--\u003e\u003c\/style\u003e\n\u003cscript type=\"text\/javascript\"\u003e\/\/ \u003c![CDATA[\nvar Modal = (function() {\n\n var trigger = $qsa('.modal__trigger'); \/\/ what you click to activate the modal\n var modals = $qsa('.modal'); \/\/ the entire modal (takes up entire window)\n var modalsbg = $qsa('.modal__bg'); \/\/ the entire modal (takes up entire window)\n var content = $qsa('.modal__content'); \/\/ the inner content of the modal\n var closers = $qsa('.modal__close'); \/\/ an element used to close the modal\n var w = window;\n var isOpen = false;\n var contentDelay = 400; \/\/ duration after you click the button and wait for the content to show\n var len = trigger.length;\n\n \/\/ make it easier for yourself by not having to type as much to select an element\n function $qsa(el) {\n return document.querySelectorAll(el);\n }\n\n var getId = function(event) {\n\n event.preventDefault();\n var self = this;\n \/\/ get the value of the data-modal attribute from the button\n var modalId = self.dataset.modal;\n var len = modalId.length;\n \/\/ remove the '#' from the string\n var modalIdTrimmed = modalId.substring(1, len);\n \/\/ select the modal we want to activate\n var modal = document.getElementById(modalIdTrimmed);\n \/\/ execute function that creates the temporary expanding div\n makeDiv(self, modal);\n };\n\n var makeDiv = function(self, modal) {\n\n var fakediv = document.getElementById('modal__temp');\n\n \/**\n * if there isn't a 'fakediv', create one and append it to the button that was\n * clicked. after that execute the function 'moveTrig' which handles the animations.\n *\/\n\n if (fakediv === null) {\n var div = document.createElement('div');\n div.id = 'modal__temp';\n self.appendChild(div);\n moveTrig(self, modal, div);\n }\n };\n\n var moveTrig = function(trig, modal, div) {\n var trigProps = trig.getBoundingClientRect();\n var m = modal;\n var mProps = m.querySelector('.modal__content').getBoundingClientRect();\n var transX, transY, scaleX, scaleY;\n var xc = w.innerWidth \/ 2;\n var yc = w.innerHeight \/ 2;\n\n \/\/ this class increases z-index value so the button goes overtop the other buttons\n trig.classList.add('modal__trigger--active');\n\n \/\/ these values are used for scale the temporary div to the same size as the modal\n scaleX = mProps.width \/ trigProps.width;\n scaleY = mProps.height \/ trigProps.height;\n\n scaleX = scaleX.toFixed(3); \/\/ round to 3 decimal places\n scaleY = scaleY.toFixed(3);\n\n\n \/\/ these values are used to move the button to the center of the window\n transX = Math.round(xc - trigProps.left - trigProps.width \/ 2);\n transY = Math.round(yc - trigProps.top - trigProps.height \/ 2);\n\n \/\/ if the modal is aligned to the top then move the button to the center-y of the modal instead of the window\n if (m.classList.contains('modal--align-top')) {\n transY = Math.round(mProps.height \/ 2 + mProps.top - trigProps.top - trigProps.height \/ 2);\n }\n\n\n \/\/ translate button to center of screen\n trig.style.transform = 'translate(' + transX + 'px, ' + transY + 'px)';\n trig.style.webkitTransform = 'translate(' + transX + 'px, ' + transY + 'px)';\n \/\/ expand temporary div to the same size as the modal\n div.style.transform = 'scale(' + scaleX + ',' + scaleY + ')';\n div.style.webkitTransform = 'scale(' + scaleX + ',' + scaleY + ')';\n\n\n window.setTimeout(function() {\n window.requestAnimationFrame(function() {\n open(m, div);\n });\n }, contentDelay);\n\n };\n\n var open = function(m, div) {\n\n if (!isOpen) {\n \/\/ select the content inside the modal\n var content = m.querySelector('.modal__content');\n \/\/ reveal the modal\n m.classList.add('modal--active');\n \/\/ reveal the modal content\n content.classList.add('modal__content--active');\n\n \/**\n * when the modal content is finished transitioning, fadeout the temporary\n * expanding div so when the window resizes it isn't visible ( it doesn't\n * move with the window).\n *\/\n\n content.addEventListener('transitionend', hideDiv, false);\n\n isOpen = true;\n }\n\n function hideDiv() {\n \/\/ fadeout div so that it can't be seen when the window is resized\n div.style.opacity = '0';\n content.removeEventListener('transitionend', hideDiv, false);\n }\n };\n\n var close = function(event) {\n\n event.preventDefault();\n event.stopImmediatePropagation();\n\n var target = event.target;\n var div = document.getElementById('modal__temp');\n\n \/**\n * make sure the modal__bg or modal__close was clicked, we don't want to be able to click\n * inside the modal and have it close.\n *\/\n\n if (isOpen \u0026\u0026 target.classList.contains('modal__bg') || target.classList.contains('modal__close')) {\n\n \/\/ make the hidden div visible again and remove the transforms so it scales back to its original size\n div.style.opacity = '1';\n div.removeAttribute('style');\n\n \/**\n * iterate through the modals and modal contents and triggers to remove their active classes.\n * remove the inline css from the trigger to move it back into its original position.\n *\/\n\n for (var i = 0; i \u003c len; i++) {\n modals[i].classList.remove('modal--active');\n content[i].classList.remove('modal__content--active');\n trigger[i].style.transform = 'none';\n trigger[i].style.webkitTransform = 'none';\n trigger[i].classList.remove('modal__trigger--active');\n }\n\n \/\/ when the temporary div is opacity:1 again, we want to remove it from the dom\n div.addEventListener('transitionend', removeDiv, false);\n\n isOpen = false;\n\n }\n\n function removeDiv() {\n setTimeout(function() {\n window.requestAnimationFrame(function() {\n \/\/ remove the temp div from the dom with a slight delay so the animation looks good\n div.remove();\n });\n }, contentDelay - 50);\n }\n\n };\n\n var bindActions = function() {\n for (var i = 0; i \u003c len; i++) {\n trigger[i].addEventListener('click', getId, false);\n closers[i].addEventListener('click', close, false);\n modalsbg[i].addEventListener('click', close, false);\n }\n };\n\n var init = function() {\n bindActions();\n };\n\n return {\n init: init\n };\n\n }());\n\n Modal.init();\n\/\/ ]]\u003e\u003c\/script\u003e\n\u003cstyle\u003e\u003c!--\n.desc {\n border: 1px solid #e8e5e2;\n border-radius: 10px;\n max-width: 400px;\n text-align:center;\n padding: 10px;\n display: block;\n margin: 0 auto;\n }\n .desc img{\n height:100px;\n }\n--\u003e\u003c\/style\u003e","published_at":"2019-06-19T16:49:30-05:00","created_at":"2019-06-19T16:49:30-05:00","vendor":"Green Hug","type":"","tags":["car del valle","kids","niño"],"price":17500,"price_min":17500,"price_max":17500,"available":true,"price_varies":false,"compare_at_price":35000,"compare_at_price_min":35000,"compare_at_price_max":35000,"compare_at_price_varies":false,"variants":[{"id":23369972449338,"title":"5-6","option1":"5-6","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":false,"featured_image":null,"available":false,"name":"Be HumanKIND Kids - 5-6","public_title":"5-6","options":["5-6"],"price":17500,"weight":150,"compare_at_price":35000,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":23369972514874,"title":"9-10","option1":"9-10","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"Be HumanKIND Kids - 9-10","public_title":"9-10","options":["9-10"],"price":17500,"weight":150,"compare_at_price":35000,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":23369972547642,"title":"11-12","option1":"11-12","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":false,"featured_image":null,"available":true,"name":"Be HumanKIND Kids - 11-12","public_title":"11-12","options":["11-12"],"price":17500,"weight":150,"compare_at_price":35000,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]},{"id":23369972580410,"title":"13-14","option1":"13-14","option2":null,"option3":null,"sku":"","requires_shipping":true,"taxable":false,"featured_image":null,"available":false,"name":"Be HumanKIND Kids - 13-14","public_title":"13-14","options":["13-14"],"price":17500,"weight":150,"compare_at_price":35000,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0054.jpg?v=1560981475","\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0055.jpg?v=1560981475","\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0028.jpg?v=1560981475","\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0029.jpg?v=1560981475","\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0030.jpg?v=1560981475"],"featured_image":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0054.jpg?v=1560981475","options":["Talla"],"media":[{"alt":null,"id":2104345493562,"position":1,"preview_image":{"aspect_ratio":0.667,"height":2250,"width":1500,"src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0054.jpg?v=1560981475"},"aspect_ratio":0.667,"height":2250,"media_type":"image","src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0054.jpg?v=1560981475","width":1500},{"alt":null,"id":2104347033658,"position":2,"preview_image":{"aspect_ratio":0.667,"height":2250,"width":1500,"src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0055.jpg?v=1560981475"},"aspect_ratio":0.667,"height":2250,"media_type":"image","src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0055.jpg?v=1560981475","width":1500},{"alt":null,"id":2104345559098,"position":3,"preview_image":{"aspect_ratio":0.667,"height":2250,"width":1500,"src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0028.jpg?v=1560981475"},"aspect_ratio":0.667,"height":2250,"media_type":"image","src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0028.jpg?v=1560981475","width":1500},{"alt":null,"id":2104345624634,"position":4,"preview_image":{"aspect_ratio":0.667,"height":2250,"width":1500,"src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0029.jpg?v=1560981475"},"aspect_ratio":0.667,"height":2250,"media_type":"image","src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0029.jpg?v=1560981475","width":1500},{"alt":null,"id":2104345657402,"position":5,"preview_image":{"aspect_ratio":0.667,"height":2250,"width":1500,"src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0030.jpg?v=1560981475"},"aspect_ratio":0.667,"height":2250,"media_type":"image","src":"\/\/www.greenhug.com\/cdn\/shop\/products\/GreenHug-Junio2019-0030.jpg?v=1560981475","width":1500}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003ch5\u003ePlantamos un árbol por cada producto\u003c\/h5\u003e\n\u003cimg height=\"984\" width=\"551\" src=\"https:\/\/cdn.shopify.com\/s\/files\/1\/0012\/7287\/3018\/t\/4\/assets\/info_ROPA_Green_Hug.png?v=1592417502\"\u003e\n\u003cdiv aria-hidden=\"true\" role=\"dialog\" class=\"modal modal__bg\" id=\"modal\"\u003e\n\u003cdiv class=\"modal__dialog\"\u003e\n\u003cdiv class=\"modal__content\"\u003e\n\u003cimg alt=\"\" src=\"\/\/cdn.shopify.com\/s\/files\/1\/0012\/7287\/3018\/t\/4\/assets\/nino.png?767\" style=\"height: 400px;\"\u003e \u003ca class=\"modal__close demo-close\"\u003e \u003csvg viewbox=\"0 0 24 24\" class=\"\"\u003e \u003cpath d=\"M19 6.41l-1.41-1.41-5.59 5.59-5.59-5.59-1.41 1.41 5.59 5.59-5.59 5.59 1.41 1.41 5.59-5.59 5.59 5.59 1.41-1.41-5.59-5.59z\"\u003e\u003c\/path\u003e \u003cpath fill=\"none\" d=\"M0 0h24v24h-24z\"\u003e\u003c\/path\u003e \u003c\/svg\u003e \u003c\/a\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003cstyle media=\"screen\"\u003e\u003c!--\n@media (max-width: 590px) {\n .modal__content img{\n height: 180px !important;\n}\n }\n\n.modal {\n will-change: visibility, opacity;\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 1000;\n visibility: hidden;\n opacity: 0;\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);\ntext-align: center !important;\n}\n.modal--active {\n visibility: visible;\n opacity: 1;\n}\n.modal--align-top {\n align-items: flex-start;\n}\n.modal__bg {\n background: transparent;\n}\n.modal__dialog {\n max-width: 800px;\n padding: 1.2rem;\n text-align: center !important;\n}\n.modal__content {\n will-change: transform, opacity;\n position: relative;\n padding: 2.4rem !important;\n background: white;\n background-clip: padding-box;\n box-shadow: 0 12px 15px 0 rgba(0,0,0,0.25);\n opacity: 0;\n transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);\ntext-align: center !important;\n}\n.modal__content--active {\n opacity: 1;\n}\n.modal-text{\nborder: 1px solid red;\n}\n.modal__close {\n z-index: 1100;\n cursor: pointer;\n}\n.modal__trigger {\n position: relative;\n display: inline-block;\n margin: 1 auto;\n padding: 1.2rem 2.4rem;\n color: white;\n background-color: #a9bb18;\n line-height: 1;\n cursor: pointer;\n box-shadow: 0 2px 5px 0 rgba(0,0,0,0.26);\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n border-radius:25px;\n position: relative; left: 50% !important;\ntransform: translateX(-50%) !important;\n}\n.modal__trigger p{\npadding-top:20px;\n}\n\n.modal__trigger--active {\n z-index: 10;\n}\n\n#modal__temp {\n will-change: transform, opacity;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: white;\n -webkit-transform: none;\n transform: none;\n opacity: 1;\n transition: opacity 0.1s ease-out, -webkit-transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n transition: opacity 0.1s ease-out, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n transition: opacity 0.1s ease-out, transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), -webkit-transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n}\n\n.demo-btns header {\n padding: 7vh 10vw;\n background: #ffebee;\n display: flex;\n align-items: center;\n}\n.demo-btns header h1 {\n margin: 0;\n color: rgba(0,0,0,0.54);\n font-weight: 300;\n}\n.demo-btns .info {\n background: #f44336;\n padding: 3vh 10vw;\n height: 70vh;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-flow: column wrap;\n}\n@media (max-width: 700px) {\n .modal__content br{\n display: none !important;\n}\n\n}\n.demo-close {\n position: absolute;\n top: 0;\n right: 0;\n margin: 1.2rem;\n padding: 0.6rem;\n background: rgba(0,0,0,0.3);\n border-radius: 50%;\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);\n}\n.demo-close svg {\n width: 24px;\n fill: #fff;\n pointer-events: none;\n vertical-align: top;\n}\n.demo-close:hover {\n background: rgba(0,0,0,0.6);\n}\n--\u003e\u003c\/style\u003e\n\u003cscript type=\"text\/javascript\"\u003e\/\/ \u003c![CDATA[\nvar Modal = (function() {\n\n var trigger = $qsa('.modal__trigger'); \/\/ what you click to activate the modal\n var modals = $qsa('.modal'); \/\/ the entire modal (takes up entire window)\n var modalsbg = $qsa('.modal__bg'); \/\/ the entire modal (takes up entire window)\n var content = $qsa('.modal__content'); \/\/ the inner content of the modal\n var closers = $qsa('.modal__close'); \/\/ an element used to close the modal\n var w = window;\n var isOpen = false;\n var contentDelay = 400; \/\/ duration after you click the button and wait for the content to show\n var len = trigger.length;\n\n \/\/ make it easier for yourself by not having to type as much to select an element\n function $qsa(el) {\n return document.querySelectorAll(el);\n }\n\n var getId = function(event) {\n\n event.preventDefault();\n var self = this;\n \/\/ get the value of the data-modal attribute from the button\n var modalId = self.dataset.modal;\n var len = modalId.length;\n \/\/ remove the '#' from the string\n var modalIdTrimmed = modalId.substring(1, len);\n \/\/ select the modal we want to activate\n var modal = document.getElementById(modalIdTrimmed);\n \/\/ execute function that creates the temporary expanding div\n makeDiv(self, modal);\n };\n\n var makeDiv = function(self, modal) {\n\n var fakediv = document.getElementById('modal__temp');\n\n \/**\n * if there isn't a 'fakediv', create one and append it to the button that was\n * clicked. after that execute the function 'moveTrig' which handles the animations.\n *\/\n\n if (fakediv === null) {\n var div = document.createElement('div');\n div.id = 'modal__temp';\n self.appendChild(div);\n moveTrig(self, modal, div);\n }\n };\n\n var moveTrig = function(trig, modal, div) {\n var trigProps = trig.getBoundingClientRect();\n var m = modal;\n var mProps = m.querySelector('.modal__content').getBoundingClientRect();\n var transX, transY, scaleX, scaleY;\n var xc = w.innerWidth \/ 2;\n var yc = w.innerHeight \/ 2;\n\n \/\/ this class increases z-index value so the button goes overtop the other buttons\n trig.classList.add('modal__trigger--active');\n\n \/\/ these values are used for scale the temporary div to the same size as the modal\n scaleX = mProps.width \/ trigProps.width;\n scaleY = mProps.height \/ trigProps.height;\n\n scaleX = scaleX.toFixed(3); \/\/ round to 3 decimal places\n scaleY = scaleY.toFixed(3);\n\n\n \/\/ these values are used to move the button to the center of the window\n transX = Math.round(xc - trigProps.left - trigProps.width \/ 2);\n transY = Math.round(yc - trigProps.top - trigProps.height \/ 2);\n\n \/\/ if the modal is aligned to the top then move the button to the center-y of the modal instead of the window\n if (m.classList.contains('modal--align-top')) {\n transY = Math.round(mProps.height \/ 2 + mProps.top - trigProps.top - trigProps.height \/ 2);\n }\n\n\n \/\/ translate button to center of screen\n trig.style.transform = 'translate(' + transX + 'px, ' + transY + 'px)';\n trig.style.webkitTransform = 'translate(' + transX + 'px, ' + transY + 'px)';\n \/\/ expand temporary div to the same size as the modal\n div.style.transform = 'scale(' + scaleX + ',' + scaleY + ')';\n div.style.webkitTransform = 'scale(' + scaleX + ',' + scaleY + ')';\n\n\n window.setTimeout(function() {\n window.requestAnimationFrame(function() {\n open(m, div);\n });\n }, contentDelay);\n\n };\n\n var open = function(m, div) {\n\n if (!isOpen) {\n \/\/ select the content inside the modal\n var content = m.querySelector('.modal__content');\n \/\/ reveal the modal\n m.classList.add('modal--active');\n \/\/ reveal the modal content\n content.classList.add('modal__content--active');\n\n \/**\n * when the modal content is finished transitioning, fadeout the temporary\n * expanding div so when the window resizes it isn't visible ( it doesn't\n * move with the window).\n *\/\n\n content.addEventListener('transitionend', hideDiv, false);\n\n isOpen = true;\n }\n\n function hideDiv() {\n \/\/ fadeout div so that it can't be seen when the window is resized\n div.style.opacity = '0';\n content.removeEventListener('transitionend', hideDiv, false);\n }\n };\n\n var close = function(event) {\n\n event.preventDefault();\n event.stopImmediatePropagation();\n\n var target = event.target;\n var div = document.getElementById('modal__temp');\n\n \/**\n * make sure the modal__bg or modal__close was clicked, we don't want to be able to click\n * inside the modal and have it close.\n *\/\n\n if (isOpen \u0026\u0026 target.classList.contains('modal__bg') || target.classList.contains('modal__close')) {\n\n \/\/ make the hidden div visible again and remove the transforms so it scales back to its original size\n div.style.opacity = '1';\n div.removeAttribute('style');\n\n \/**\n * iterate through the modals and modal contents and triggers to remove their active classes.\n * remove the inline css from the trigger to move it back into its original position.\n *\/\n\n for (var i = 0; i \u003c len; i++) {\n modals[i].classList.remove('modal--active');\n content[i].classList.remove('modal__content--active');\n trigger[i].style.transform = 'none';\n trigger[i].style.webkitTransform = 'none';\n trigger[i].classList.remove('modal__trigger--active');\n }\n\n \/\/ when the temporary div is opacity:1 again, we want to remove it from the dom\n div.addEventListener('transitionend', removeDiv, false);\n\n isOpen = false;\n\n }\n\n function removeDiv() {\n setTimeout(function() {\n window.requestAnimationFrame(function() {\n \/\/ remove the temp div from the dom with a slight delay so the animation looks good\n div.remove();\n });\n }, contentDelay - 50);\n }\n\n };\n\n var bindActions = function() {\n for (var i = 0; i \u003c len; i++) {\n trigger[i].addEventListener('click', getId, false);\n closers[i].addEventListener('click', close, false);\n modalsbg[i].addEventListener('click', close, false);\n }\n };\n\n var init = function() {\n bindActions();\n };\n\n return {\n init: init\n };\n\n }());\n\n Modal.init();\n\/\/ ]]\u003e\u003c\/script\u003e\n\u003cstyle\u003e\u003c!--\n.desc {\n border: 1px solid #e8e5e2;\n border-radius: 10px;\n max-width: 400px;\n text-align:center;\n padding: 10px;\n display: block;\n margin: 0 auto;\n }\n .desc img{\n height:100px;\n }\n--\u003e\u003c\/style\u003e"}