{"id":278,"date":"2013-11-13T03:59:00","date_gmt":"2013-11-13T03:59:00","guid":{"rendered":"http:\/\/blog.luisrodriguez.pe\/?p=278"},"modified":"2014-11-10T22:42:09","modified_gmt":"2014-11-10T22:42:09","slug":"crear-un-lightbox-con-jquery","status":"publish","type":"post","link":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/","title":{"rendered":"crear un lightbox con jquery"},"content":{"rendered":"<p><a href=\"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox.jpg\"><img fetchpriority=\"high\" decoding=\"async\" src=\"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg\" alt=\"\" title=\"css-lightbox\" width=\"300\" height=\"173\" class=\"alignright size-medium wp-image-411\" srcset=\"https:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg 300w, https:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox.jpg 480w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><strong>Lightbox<\/strong> un efecto para mostrar imagenes o contenido que son atractivas al usuario pero por veces estamos empe\u00f1ados en hacer menos pesada nuestra pagina web por un tema de velocidad de respuesta y ademas que nos beneficia en el SEO.<\/p>\n<p>entonces en este articulo les mostrare a realizar uno facilmente y entienden como funcionan.<\/p>\n\n<div class=\"wp_syntax\"><table><tr><td class=\"code\"><pre class=\"javascript\" style=\"font-family:monospace;\">lightbox<span style=\"color: #339933;\">=<\/span> <span style=\"color: #000066; font-weight: bold;\">function<\/span> <span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n<span style=\"color: #009900;\">&#123;<\/span>   \n            <span style=\"color: #006600; font-style: italic;\">\/*en el body agregamos un div con id popup_bg que nos servir\u00e1 para colocar una capa bloque toda la pagina y con un background oscuro transparente*\/<\/span>\n            $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;body&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">append<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;&lt;div id='popup_bg'&gt;&lt;\/div&gt;&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>\n           <span style=\"color: #006600; font-style: italic;\">\/*le damos unos atributos y aqui uno de los mas importantes es ser posicion absoluto ,obtener el ancho, alto del navegador y zindex que le ponemos un numero alto para sobre ponerlo a todos *\/<\/span>\n                        $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;#popup_bg&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">css<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n                                width <span style=\"color: #339933;\">:<\/span> $<span style=\"color: #009900;\">&#40;<\/span>window<span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">width<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span> <span style=\"color: #339933;\">+<\/span> <span style=\"color: #3366CC;\">&quot;px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                height <span style=\"color: #339933;\">:<\/span> $<span style=\"color: #009900;\">&#40;<\/span>window<span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">height<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span> <span style=\"color: #339933;\">+<\/span> <span style=\"color: #3366CC;\">&quot;px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                opacity <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;0.4&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                filter <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;alpha(opacity=40)&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                position <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;absolute&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                background <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;#000&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                left <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;0px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                top <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;0px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                                zIndex <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;100000&quot;<\/span>\n                        <span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>\n        <span style=\"color: #006600; font-style: italic;\">\/*ahora agremamos un div contenedor del contenido y la capa donde carag todo el contenido y le creamos un boton para cerrar*\/<\/span>              \n        $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;body&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">append<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;&lt;div id='popup'&gt;&lt;div class='cerrar'&gt;&lt;a href='javascript:void(0)'&gt;&lt; img src='https:\/\/cdn1.iconfinder.com\/data\/icons\/officeicons\/PNG\/24\/Close.png' \/&gt;&lt;\/a&gt;&lt;\/div&gt;&lt;div id='popup_contenido'&gt;luisrodriguez.pe&lt;\/div&gt;&lt;\/div&gt;&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>\n        <span style=\"color: #006600; font-style: italic;\">\/*si presionan cerrar hacemos que se oculte suavemente y al termino borramos los elementos que son del lightbox*\/<\/span>\n        $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;#popup div.cerrar,#popup_bg&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">click<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #000066; font-weight: bold;\">function<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n              $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;#popup, #popup_bg&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">fadeOut<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #CC0000;\">1000<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000066; font-weight: bold;\">function<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n                 $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;#popup, #popup_bg&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">remove<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span> \n              <span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n          <span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n         <span style=\"color: #006600; font-style: italic;\">\/*centramos la capa 700 de ancho en el 50% del left pero con un margin left -350 y por que ? seria la mitad del ancho asi obtenemos un centrado perfecto*\/<\/span>\n               $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;#popup&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">css<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n\t\t\twidth <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;700px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\theight <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;400px&quot;<\/span><span style=\"color: #339933;\">,<\/span> \n\t\t\tposition <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;absolute&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\tleft <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;50%&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\ttop <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;50%&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\tzIndex <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;100001&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\tmarginLeft <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;-350px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                        marginTop <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;-200px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                        background<span style=\"color: #339933;\">:<\/span><span style=\"color: #3366CC;\">&quot;#000&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                        overflow<span style=\"color: #339933;\">:<\/span><span style=\"color: #3366CC;\">&quot;auto&quot;<\/span><span style=\"color: #339933;\">,<\/span> \n                        paddingRight<span style=\"color: #339933;\">:<\/span><span style=\"color: #3366CC;\">&quot;20px&quot;<\/span>\n\t\t<span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>  \n         <span style=\"color: #006600; font-style: italic;\">\/*colocamos el boton cerrar a la derecha*\/<\/span>\n                $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;#popup div.cerrar&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">css<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n\t\t\twidth <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;27px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\theight <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;25px&quot;<\/span><span style=\"color: #339933;\">,<\/span> \n\t\t\tposition <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;absolute&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\tmarginLeft<span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;677px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                        marginTop<span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;14px&quot;<\/span>\n\t\t<span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>   \n&nbsp;\n         <span style=\"color: #006600; font-style: italic;\">\/*la capa donde estara todo el texto o imagen*\/<\/span>        \n                $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;#popup div#popup_contenido&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">css<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n\t\t\twidth <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;675px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n\t\t\theight <span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;330px&quot;<\/span><span style=\"color: #339933;\">,<\/span> \n                        marginLeft<span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;25px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                        marginTop<span style=\"color: #339933;\">:<\/span> <span style=\"color: #3366CC;\">&quot;46px&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                        overflow<span style=\"color: #339933;\">:<\/span><span style=\"color: #3366CC;\">&quot;auto&quot;<\/span><span style=\"color: #339933;\">,<\/span>\n                        color<span style=\"color: #339933;\">:<\/span><span style=\"color: #3366CC;\">&quot;#fff&quot;<\/span>\n\t\t<span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span> \n<span style=\"color: #009900;\">&#125;<\/span>\n&nbsp;\n$<span style=\"color: #009900;\">&#40;<\/span>document<span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">ready<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #000066; font-weight: bold;\">function<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n    <span style=\"color: #006600; font-style: italic;\">\/*por ejemplo aqui cargamos el lightbox cuando termina de cargar la pagina sin necesidad de un click*\/<\/span>\n    lightbox<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n     <span style=\"color: #006600; font-style: italic;\">\/*al clickear una etiqueta a unos cargara el lightbox con el contenido que agregamos al momento de crear la capa contenido*\/<\/span>      \n    $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;a.prueba1&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">click<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #000066; font-weight: bold;\">function<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n         lightbox<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span> \n         <span style=\"color: #000066; font-weight: bold;\">return<\/span> <span style=\"color: #003366; font-weight: bold;\">false<\/span>\n    <span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n    <span style=\"color: #006600; font-style: italic;\">\/*pero el ejemplo de arriba funciona nada bien en un caso practico*\/<\/span>\n    <span style=\"color: #006600; font-style: italic;\">\/*entonces lo mejoramos y hacemos que al clikear un link obtenemos el href y lo cargamos por ajax y lo mostramos en la capa del contenido*\/<\/span>\n    $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;a.prueba2&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">click<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #000066; font-weight: bold;\">function<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n        $.<span style=\"color: #000066; font-weight: bold;\">get<\/span><span style=\"color: #009900;\">&#40;<\/span>$<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #000066; font-weight: bold;\">this<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">attr<\/span><span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">&quot;href&quot;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">,<\/span><span style=\"color: #000066; font-weight: bold;\">function<\/span><span style=\"color: #009900;\">&#40;<\/span>data<span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #009900;\">&#123;<\/span>\n            lightbox<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>\n            $<span style=\"color: #009900;\">&#40;<\/span><span style=\"color: #3366CC;\">'#popup div#popup_contenido'<\/span><span style=\"color: #009900;\">&#41;<\/span>.<span style=\"color: #660066;\">html<\/span><span style=\"color: #009900;\">&#40;<\/span>data<span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span> \n        <span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span><span style=\"color: #339933;\">;<\/span>\n         <span style=\"color: #000066; font-weight: bold;\">return<\/span> <span style=\"color: #003366; font-weight: bold;\">false<\/span>\n    <span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span>\n&nbsp;\n&nbsp;\n<span style=\"color: #009900;\">&#125;<\/span><span style=\"color: #009900;\">&#41;<\/span><\/pre><\/td><\/tr><\/table><\/div>\n\n\n<div class=\"wp_syntax\"><table><tr><td class=\"code\"><pre class=\"html\" style=\"font-family:monospace;\">&lt;a class=&quot;prueba1&quot; href=&quot;pagina1.html&quot;&gt;pagina 1&lt;\/a&gt;\r\n&lt;a class=&quot;prueba2&quot; href=&quot;pagina1.html&quot;&gt;pagina 2&lt;\/a&gt;<\/pre><\/td><\/tr><\/table><\/div>\n\n<p>les dejo el archivo con las fuentes para descargar<\/p>\n<p><a href=\"http:\/\/luisrodriguez.pe\/demos\/scripts\/lightbox\/lightbox.rar\">http:\/\/luisrodriguez.pe\/demos\/scripts\/lightbox\/lightbox.rar<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Lightbox un efecto para mostrar imagenes o contenido que son atractivas al usuario pero por veces estamos empe\u00f1ados en hacer menos pesada nuestra pagina web por un tema de velocidad de respuesta y ademas que nos beneficia en el SEO. entonces en este articulo les mostrare a realizar uno facilmente y entienden como funcionan. lightbox=[&#8230;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-278","post","type-post","status-publish","format-standard","hentry","category-jquery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>crear un lightbox con jquery - Blog Luis Rodriguez<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"crear un lightbox con jquery - Blog Luis Rodriguez\" \/>\n<meta property=\"og:description\" content=\"Lightbox un efecto para mostrar imagenes o contenido que son atractivas al usuario pero por veces estamos empe\u00f1ados en hacer menos pesada nuestra pagina web por un tema de velocidad de respuesta y ademas que nos beneficia en el SEO. entonces en este articulo les mostrare a realizar uno facilmente y entienden como funcionan. lightbox=[...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Luis Rodriguez\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/luisrodriguez.pe\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-13T03:59:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-10T22:42:09+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg\" \/>\n<meta name=\"author\" content=\"Luis Rodriguez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@luizmirodriguez\" \/>\n<meta name=\"twitter:site\" content=\"@luizmirodriguez\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Luis Rodriguez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/\"},\"author\":{\"name\":\"Luis Rodriguez\",\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/#\/schema\/person\/ec55de81e01fdaf3533eb78f6a49090c\"},\"headline\":\"crear un lightbox con jquery\",\"datePublished\":\"2013-11-13T03:59:00+00:00\",\"dateModified\":\"2014-11-10T22:42:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/\"},\"wordCount\":77,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg\",\"articleSection\":[\"Jquery\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/\",\"url\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/\",\"name\":\"crear un lightbox con jquery - Blog Luis Rodriguez\",\"isPartOf\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg\",\"datePublished\":\"2013-11-13T03:59:00+00:00\",\"dateModified\":\"2014-11-10T22:42:09+00:00\",\"author\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/#\/schema\/person\/ec55de81e01fdaf3533eb78f6a49090c\"},\"breadcrumb\":{\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage\",\"url\":\"https:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox.jpg\",\"contentUrl\":\"https:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox.jpg\",\"width\":480,\"height\":278},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/luisrodriguez.pe\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"crear un lightbox con jquery\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/#website\",\"url\":\"https:\/\/luisrodriguez.pe\/blog\/\",\"name\":\"Blog Luis Rodriguez\",\"description\":\"Analytics Developer\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/luisrodriguez.pe\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/luisrodriguez.pe\/blog\/#\/schema\/person\/ec55de81e01fdaf3533eb78f6a49090c\",\"name\":\"Luis Rodriguez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/3b0f9734b267ecb38e1860734b4caebda4efa8be9a2bb536862b6a2ba23afa82?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3b0f9734b267ecb38e1860734b4caebda4efa8be9a2bb536862b6a2ba23afa82?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3b0f9734b267ecb38e1860734b4caebda4efa8be9a2bb536862b6a2ba23afa82?s=96&d=mm&r=g\",\"caption\":\"Luis Rodriguez\"},\"description\":\"Hola, Soy Luis Rodriguez, radico en Lima \u2013 Per\u00fa, formado en una carrera inform\u00e1tica, desempe\u00f1ando desde el 2007 como programador web y viendo proyectos desde Front End y Back End a lo que me perfile como Full Stack. Esta Experiencia junto a mi inter\u00e9s en la Anal\u00edtica Web me ayud\u00f3 mucho entender el funcionamiento interno de las herramientas de anal\u00edtica, con las que vengo trabajo activamente desde 2017. Linkedin\",\"sameAs\":[\"http:\/\/luisrodriguez.pe\"],\"url\":\"https:\/\/luisrodriguez.pe\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"crear un lightbox con jquery - Blog Luis Rodriguez","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:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/","og_locale":"es_ES","og_type":"article","og_title":"crear un lightbox con jquery - Blog Luis Rodriguez","og_description":"Lightbox un efecto para mostrar imagenes o contenido que son atractivas al usuario pero por veces estamos empe\u00f1ados en hacer menos pesada nuestra pagina web por un tema de velocidad de respuesta y ademas que nos beneficia en el SEO. entonces en este articulo les mostrare a realizar uno facilmente y entienden como funcionan. lightbox=[...]","og_url":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/","og_site_name":"Blog Luis Rodriguez","article_publisher":"https:\/\/www.facebook.com\/luisrodriguez.pe","article_published_time":"2013-11-13T03:59:00+00:00","article_modified_time":"2014-11-10T22:42:09+00:00","og_image":[{"url":"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg","type":"","width":"","height":""}],"author":"Luis Rodriguez","twitter_card":"summary_large_image","twitter_creator":"@luizmirodriguez","twitter_site":"@luizmirodriguez","twitter_misc":{"Escrito por":"Luis Rodriguez","Tiempo de lectura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#article","isPartOf":{"@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/"},"author":{"name":"Luis Rodriguez","@id":"https:\/\/luisrodriguez.pe\/blog\/#\/schema\/person\/ec55de81e01fdaf3533eb78f6a49090c"},"headline":"crear un lightbox con jquery","datePublished":"2013-11-13T03:59:00+00:00","dateModified":"2014-11-10T22:42:09+00:00","mainEntityOfPage":{"@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/"},"wordCount":77,"commentCount":0,"image":{"@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage"},"thumbnailUrl":"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg","articleSection":["Jquery"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/","url":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/","name":"crear un lightbox con jquery - Blog Luis Rodriguez","isPartOf":{"@id":"https:\/\/luisrodriguez.pe\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage"},"image":{"@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage"},"thumbnailUrl":"http:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox-300x173.jpg","datePublished":"2013-11-13T03:59:00+00:00","dateModified":"2014-11-10T22:42:09+00:00","author":{"@id":"https:\/\/luisrodriguez.pe\/blog\/#\/schema\/person\/ec55de81e01fdaf3533eb78f6a49090c"},"breadcrumb":{"@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#primaryimage","url":"https:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox.jpg","contentUrl":"https:\/\/luisrodriguez.pe\/blog\/wp-content\/uploads\/2013\/11\/css-lightbox.jpg","width":480,"height":278},{"@type":"BreadcrumbList","@id":"https:\/\/luisrodriguez.pe\/blog\/crear-un-lightbox-con-jquery\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/luisrodriguez.pe\/blog\/"},{"@type":"ListItem","position":2,"name":"crear un lightbox con jquery"}]},{"@type":"WebSite","@id":"https:\/\/luisrodriguez.pe\/blog\/#website","url":"https:\/\/luisrodriguez.pe\/blog\/","name":"Blog Luis Rodriguez","description":"Analytics Developer","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/luisrodriguez.pe\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Person","@id":"https:\/\/luisrodriguez.pe\/blog\/#\/schema\/person\/ec55de81e01fdaf3533eb78f6a49090c","name":"Luis Rodriguez","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/3b0f9734b267ecb38e1860734b4caebda4efa8be9a2bb536862b6a2ba23afa82?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3b0f9734b267ecb38e1860734b4caebda4efa8be9a2bb536862b6a2ba23afa82?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3b0f9734b267ecb38e1860734b4caebda4efa8be9a2bb536862b6a2ba23afa82?s=96&d=mm&r=g","caption":"Luis Rodriguez"},"description":"Hola, Soy Luis Rodriguez, radico en Lima \u2013 Per\u00fa, formado en una carrera inform\u00e1tica, desempe\u00f1ando desde el 2007 como programador web y viendo proyectos desde Front End y Back End a lo que me perfile como Full Stack. Esta Experiencia junto a mi inter\u00e9s en la Anal\u00edtica Web me ayud\u00f3 mucho entender el funcionamiento interno de las herramientas de anal\u00edtica, con las que vengo trabajo activamente desde 2017. Linkedin","sameAs":["http:\/\/luisrodriguez.pe"],"url":"https:\/\/luisrodriguez.pe\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/posts\/278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/comments?post=278"}],"version-history":[{"count":6,"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/posts\/278\/revisions"}],"predecessor-version":[{"id":680,"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/posts\/278\/revisions\/680"}],"wp:attachment":[{"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/media?parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/categories?post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/luisrodriguez.pe\/blog\/wp-json\/wp\/v2\/tags?post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}