Jquery and css gallery
На чтение 7 мин
Красивая галерея на jQuery.
Сегодня мы сделаем простую jQuery галерею, которая будет сканировать папку с изображениями и показывать их в галерее. Мы будем использовать PHP, jQuery, CSS и плагин jQuery — Lightbox.
HTML
Место для php кода пока пусто, заполним его.
PHP
Задача нашего php кода — просканировать папку с изображениями и вывести их с соответствующим CSS оформлением. Такой подход делает добавление новых изображений в галерею очень простым — просто добавьте их в папку к уже существующим.
'.$title.'
'; $i++; > > closedir($dir_handle); //закроем папку ?> CSS
Мы создали каркас нашей галереи, осталось придать ей красивый вид:
body,h1,h2,h3,p,td,quote,small,form,input,ul,li,ol,label < margin:0px; padding:0px; font-family:Arial, Helvetica, sans-serif; >body < margin-top:20px; color:white; font-size:13px; background-color:#222222; >.clear < clear:both; >a, a:visited < color:#00BBFF; text-decoration:none; outline:none; >a:hover < text-decoration:underline; >#container < width:890px; margin:20px auto; >#heading,#footer < background-color:#2A2A2A; border:1px solid #444444; height:20px; padding:6px 0 25px 15px; margin-bottom:30px; overflow:hidden; >#footer < height:10px; margin:20px 0 20px 0; padding:6px 0 11px 15px; >div.nomargin < margin-right:0px; >.pic < float:left; margin:0 15px 15px 0; border:5px solid white; width:200px; height:250px; >.pic a < width:200px; height:250px; text-indent:-99999px; display:block; >h1 < font-size:28px; font-weight:bold; font-family:"Trebuchet MS",Arial, Helvetica, sans-serif; >h2
jQuery
В нашей галерее мы будем использовать плагин Lightbox, для этого подключим необходимые файлы.
// после полной загрузки страницы $(document).ready(function()< $('.pic a').lightBox(< // мы вызываем метод lightBox и конвертируем все классы .pic в галерею Lightbox imageLoading: 'lightbox/images/loading.gif', imageBtnClose: 'lightbox/images/close.gif', imageBtnPrev: 'lightbox/images/prev.gif', imageBtnNext: 'lightbox/images/next.gif' >); >);
Источник
jQuery Gallery Plugins
Download Free jQuery #Gallery Lightbox, #Photo Gallery, #Polaroid Gallery and #Gallery Slider plugins at our jQuery Gallery Section. Page 1 .
jQuery Plugin For Universal Language Selector — ULS
ULS is a jQuery plugin that allows you to implement a clean Wikimedia Universal Language Selector on your website.
Image Gallery For Mobile Devices — PhotoSwipe
PhotoSwipe is an Image Gallery For Mobile and Touch Devices. It supports iPhone, iPad, Blackberry 6 , Android and desktop.
Display Image Galleries In A Fullscreen Lightbox — cwa_lightbox
A simple, lightweight lightbox plugin that provides an elegant way to showcase portfolios, products, and any image content with a stylish fullscreen gallery lightbox.
Responsive Touch-enabled Image Lightbox Plugin
Just another jQuery plugin helps you create image lightbox and gallery lightbox on your desktop and mobile websites.
Responsive Fullscreen Photo Gallery — jQuery Story-Show-Gallery
Simple Scroll Gallery is a lightweight, flexible, responsive, interactive jQuery Photo Gallery plugin created for desktop, tablet, and mobile.
Responsive Image/Video Lightbox Gallery — jQuery LBT-Lightbox
A responsive and easy-to-use jQuery gallery lightbox plugin that provides a user-friendly way to showcase images and videos on your website or web application.
Responsive Feature-rich Photo Viewer In Pure JavaScript
A feature-rich photo viewer plugin in pure JavaScript that displays all your images in a responsive, draggable, navigatable, resizable, maximizable dialog window.
Responsive jQuery Equal Height Photo Gallery Plugin — Pycs Layout
Pycs-Layout is a jQuery plugin for creating a responsive & compact image layout/gallery which distributes your images by preserving their aspect-ratios and filling the maximum amount of space.
Responsive Justified Gallery Plugin For jQuery — TJ gallery
TJ gallery is a jQuery photo gallery plugin which resizes and arranges your images with different sizes in a responsive, justified grid layout.
Image Lightbox & Gallery For jQuery — Lightbox2
Lightbox2 is a simple and useful script which can be used to overlay your images or photos on top of the current web page.
Responsive & Touch-Friendly jQuery Gallery Lightbox Plugin — lightGallery
lightGallery is a lightweight, elegant, responsive, mobile-friendly jQuery plugin for displaying an image/video gallery in a fullscreen lightbox with CSS3 transition effects.
jQuery Plugin For Responsive Touch-friendly Lightbox — imageLightbox
A simple, flexible, responsive, touch-friendly jQuery image lightbox/gallery plugin used for showcasing your images in an elegant way.
LC Lightbox is a responsive, flexible, powerful, mobile-friendly jQuery image viewer & gallery lightbox plugin for modern web design.
Image Gallery With In-place Zoom Functionality
A jQuery-powered image gallery that comes with an in-place zoom functionality using CSS3 transforms.
Responsive & Dynamic Image Lightbox Plugin — Chocolat
Chocolat is a Vanilla JavaScript image lightbox plugin used to create a responsive, full-sized lightbox gallery/slider on your webpage or within a specific container.
Dynamic Gallery Lightbox In jQuery — Gallery.js
A responsive, easy-to-use, user-friendly jQuery gallery lightbox plugin designed to provide an elegant image viewing experience on the webpage.
Accessible & SEO-friendly Accordion Gallery In jQuery
A free, accessible, semantic, SEO-friendly, blazing fast, gracefully degradable accordion gallery built with jQuery and CSS3 animations.
Custom Youtube Video Gallery With jQuery
A custom Youtube video player with a responsive playlist carousel, built with jQuery, Font Awesome, Bootstrap, and Owl Carousel.
Modern Photo Gallery With Lightbox Integrated — Live Image Gallery
A modern photo gallery (grid) and image lightbox script built using jQuery, CSS/CSS3, and Bootstrap 5 framework.
Minimalist Responsive Photo Gallery In jQuery
A minimal, clean, responsive photo gallery written in JavaScript (jQuery), HTML, and CSS.
Categories:
- All jQuery Plugins
- Accordion (142)
- Animation (1010)
- Chart & Graph (204)
- CSS3 & Html5 (36)
- Form (1446)
- Gallery (282)
- Layout (479)
- LightBox (523)
- Loading (310)
- Menu & Nav (947)
- Mobile (39)
- Others (2777)
- Rotator (94)
- Slider (816)
- Slideshow (314)
- Social Media (190)
- Table (346)
- Text (551)
- Time & Clock (507)
- Tooltip (151)
- Zoom (149)
Most Popular In This Category:
- Responsive Photo Gallery with jQuery and Bootstrap 3 248090 views — 03/01/2015
- Feature-rich Product Gallery With Image Zoom — xZoom 83001 views — 05/07/2021
- Responsive & Touch-Friendly jQuery Gallery Lightbox Plugin — lightGallery 74965 views — 01/12/2023
- Fully Functional jQuery Image/Video Gallery Plugin — Unite Gallery 69775 views — 02/28/2017
- Minimalist jQuery Image Gallery with Thumbnails 59676 views — 10/04/2014
- Simple jQuery Popup / Gallery Lightbox Plugin — Popup 58031 views — 10/19/2016
- jQuery Plugin For Product Viewer with Image Hover Zoom — BZoom 54098 views — 04/01/2015
- Responsive & Touch-Friendly jQuery Image & Video Gallery Plugin 41978 views — 02/22/2016
- Filterable Bootstrap 4 Gallery With Lightbox Integrated — mauGallery 41115 views — 06/05/2019
- Powerful Responsive Image Gallery Plugin — Blueimp Gallery 38968 views — 11/05/2019
- More Popular Plugins
- Responsive & Touch-Friendly jQuery Gallery Lightbox Plugin — lightGallery 74965 views — 01/12/2023
- Feature-rich Product Gallery With Image Zoom — xZoom 83001 views — 05/07/2021
- Full Featured Photo Gallery Plugin For jQuery — nanoGallery 2 18914 views — 01/06/2021
- Versatile & Flexible Image Viewer Plugin — viewer.js 10060 views — 12/14/2019
- Responsive Mobile-first Image Viewer — jQuery SmartPhoto 15474 views — 11/23/2019
- Powerful Responsive Image Gallery Plugin — Blueimp Gallery 38968 views — 11/05/2019
- Impressive Galleries With CSS Effects — Filterizr 29385 views — 07/16/2019
- Multi-purpose jQuery Photo Gallery Plugin — mbGallery 4072 views — 02/18/2019
- vintageJS — Image Vintage Effects Plugin 3143 views — 07/04/2018
- Full-featured Image Viewer/Gallery Plugin With jQuery 9463 views — 06/18/2018
- More Recommended Plugins
Источник