An open API service indexing awesome lists of open source software.

https://github.com/rayiumir/galleryslideshow

A simple library to create photo gallery thumbnails with jQuery.
https://github.com/rayiumir/galleryslideshow

Last synced: 5 months ago
JSON representation

A simple library to create photo gallery thumbnails with jQuery.

Awesome Lists containing this project

README

          

# Gallery Slide Show

A simple library to create photo gallery with jQuery.

# How to use

Add JQuery:

```html

```
Add Galleryslide:

```html

```

HTML:

```html


```

CSS:

```css
.gallery {
max-width: 800px;
margin: 0 auto;
}

.main {
width: 100%;
border: 2px solid #ddd;
margin-bottom: 10px;
position: relative;
}

.main img {
width: 100%;
display: block;
}

.thumbnails {
display: flex;
gap: 10px;
overflow: auto;
}

.thumbnail {
width: 100px;
height: 70px;
object-fit: cover;
cursor: pointer;
border: 2px solid transparent;
transition: border 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
border: 2px solid #007BFF;
}
```

jQuery:

```javascript
$(document).ready(function() {
// Handle thumbnail click
$('.thumbnail').on('click', function() {
// Remove 'active' class from all thumbnails
$('.thumbnail').removeClass('active');

// Add 'active' class to the clicked thumbnail
$(this).addClass('active');

// Get the large image URL from data attribute
var largeImage = $(this).data('large');

// Update the main image src
$('#current').attr('src', largeImage);
});
});
```

# Screenshots



Gallery Slide Show