Gallery Custom Javascript - Jquery
How do I make an gallery custom javascript - jquery?
Galería sencilla con pocas líneas de código y responsivo / Gallery simple with few lines of code and responsive.. What is a gallery custom javascript - jquery? How do you make a gallery custom javascript - jquery? This script and codes were developed by Harley Santos Garzón on 15 October 2022, Saturday.
Gallery Custom Javascript - Jquery - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Gallery Custom Javascript - Jquery</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>What forces shape you?</h1>
<section class="gallery-container"> <!--El div .previa se acciona con js para realizar la vista de la imagen en tamaño grande width="525" height="600"--> <div id="previa"> <div id="imgFull"> <img src="" alt="" width="100%"/> </div> </div> <div class="gallery"> <img src="https://s-media-cache-ak0.pinimg.com/736x/8b/64/71/8b6471891abca49c20a1ea1db3218eea.jpg" alt="736x/8b/64/71/8b6471891abca49c20a1ea1db3218eea" width="225" height="300"/> <img src="https://s-media-cache-ak0.pinimg.com/736x/31/5f/72/315f728eaf61b1e3c253711d57ae65d5.jpg" alt="736x/31/5f/72/315f728eaf61b1e3c253711d57ae65d5" width="225" height="300"/> <img src="https://s-media-cache-ak0.pinimg.com/736x/9b/e5/f7/9be5f790a236fa62c3b86e9f75925fde.jpg" alt="736x/9b/e5/f7/9be5f790a236fa62c3b86e9f75925fde" width="225" height="300"/> <img src="https://s-media-cache-ak0.pinimg.com/736x/d1/4d/b8/d14db8b885a1807cc3c3b24bc4eab064.jpg" alt="736x/d1/4d/b8/d14db8b885a1807cc3c3b24bc4eab064" width="225" height="300"/> </div>
</section> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Gallery Custom Javascript - Jquery - Script Codes CSS Codes
/*Font google Open Sans*/
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700);
body { background: tomato; font-family: 'Open Sans', sans-serif;
}
h1 { text-align: center; font-weight: 700; font-size: 2em; color: #efefef; text-shadow: 1px 1px 1px #000; line-height: 1em; margin: 1em auto;
}
.gallery-container { position: relative; width: 80%; height: auto; margin: auto; z-index:10;
}
.gallery { position: relative; min-width: 300px; max-width: 100%; min-height: 300px; max-height: auto; margin: auto;
}
.gallery img { cursor: pointer; margin-left: 30px; margin-top: 20px; margin-bottom: 20px; display: inline;
}
/*Diseño del contenedor de la previa*/
#previa { display: none; width: 100%; height: 100%; position: fixed; top: 0; left: 0; background: rgba(0,0,0,0.7); cursor: pointer; z-index:100;
}
#imgFull { width: 400px; height: auto; margin: 6em auto; background: #000;
}
@media (min-width: 0px) and (max-width: 249px){ .gallery-container { display: none; }
}
@media (min-width: 250px) and (max-width: 479px) { .gallery-container { width: 225px; } .gallery img { margin-left: 0;
} #imgFull { width: 90%; }
}
@media (min-width: 480px) and (max-width: 767px) { .gallery-container { width: 480px; } .gallery img { margin-left: 8px;
}
}
@media (min-width: 768px) and (max-width: 1024px) { .gallery-container { width: 600px; } .gallery img { margin-left: 45px;
}
}
@media (min-width: 1025px) { .gallery-container { width: 1015px; } .gallery img { margin-left: 20px;
}
}
Gallery Custom Javascript - Jquery - Script Codes JS Codes
$(document).on('ready', inicio); // Funciones claves, apertura y cierre de vista previa function inicio(){ $('.gallery img').on('click', abrirFull); $('#previa').on('click', cerrarFull); } // function abrirFull(){ var nombre = $(this).attr('alt'), direccion = "https://s-media-cache-ak0.pinimg.com/" + nombre + ".jpg"; $('#imgFull img').attr('src', direccion); $('#previa').fadeIn(); }
function cerrarFull(){ $('#previa').fadeOut();
}
Developer | Harley Santos Garzón |
Username | HarleySG |
Uploaded | October 15, 2022 |
Rating | 3 |
Size | 2,820 Kb |
Views | 16,192 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Dinamic Menu with Angularjs | 8,841 Kb |
Custom Layout with Flexbox | 11,982 Kb |
Hangman | 19,971 Kb |
Angular-deckgrid - Like Pinterest Layout | 10,518 Kb |
Simple Exercise angular app | 3,755 Kb |
SVG loading infinite | 2,936 Kb |
Modal Image - bootstrap | 2,337 Kb |
Plantilla de estudio - Pug - Sass | 5,374 Kb |
Scroll Up With Js and Css | 7,150 Kb |
Timelinr Horizontal Custom | 6,171 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Andrea Verlicchi | Verlok | 2,018 Kb |
Segments mouse following | Nosir | 2,909 Kb |
Beautiful canvas stars | Matths | 2,399 Kb |
A cube | KyleDavidE | 18,627 Kb |
Animated SVG stroke-dasharray | Netsi1964 | 3,179 Kb |
Fading gradient button | Insprd | 1,713 Kb |
Caputre Cam with JS | KimmoCommit | 2,795 Kb |
Search Box in Content Moves to Fixed Header | Chriscoyier | 2,768 Kb |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
Price | Catcode | 2,623 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!