akalicki / jquery-simple-gallery Goto Github PK
View Code? Open in Web Editor NEWQuickly create highly customizable photo galleries.
Home Page: http://alexkalicki.com/jquery-simple-gallery/
License: MIT License
Quickly create highly customizable photo galleries.
Home Page: http://alexkalicki.com/jquery-simple-gallery/
License: MIT License
_create()
should do stuff that should only happen once, when the gallery widget is created (such as declaring variables). _init()
will fire every time the gallery is reinitialized - reset the animation, source images, target CSS, and get the animation started there. Write the _init()
function so that subsequent instantiations on the same target display image will restart the gallery with the new settings.
The control currently clears all class values of selected on the document, so if anything other styling or script in the document relies on class=selected this will remove it when selecting an image.
Our fix:
In _selectImg() instead of selecting classes to remove using $('.selected') we use the image members
this.images.removeClass(this.options.selectClass);
Ideas for possible times to trigger events so the user can add more functionality:
First off, great little plugin! I'm using inside a tab system, so I'd love an easy way to destroy and recreate the plugin on demand to rebind a dynamic source when required.
At the moment, it's a little fiddly - although, any help much appreciated!
Add option to pull photo captions from thumbnail HTML (maybe "title" attribute?) and display somewhere in document. Need to add two more global options: showCaptions
(default false
) and captionTarget
(default ""
) to show whether to pull captions and where to display them. Photo descriptions should fade in and out with the target photo.
I really appreciate this gallery! It's simple to use and has some very nice basic features.
I would like to request that it be modified so that in the "thumbnails" div that contains all the images, they could be the thumbnail sized images (whatever size was appropriate for the site, not just resized by the browser, but natively that small size), and then clicking on the thumbnail image would bring to the "displayImage" div the larger sized image.
ie: clicking on the image named "photo1Thumb.jpg" in the "thumbnails" div would show "photo1Large.jpg"
The reason for this request is primarily to reduce load time of a page that has many gallery images. Loading thumbs is faster than loading all the full-sized images.
Maybe it's not that big of a benefit, but I thought I'd request it anyway.
Thanks.
John
Create "Working Demos" section in README and link to sites that currently use the plugin to further demonstrate its use. Encourage users to send in links to their pages so they can be added to the demo list.
Current sites that use simple-gallery.js:
Need to clear their fx queue inside stopAnimation
when the display image queue gets cleared.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.