dynamically scan pictures in a folder and display using jquery slideshow
anyone know how to scan a folder using jquery or javascript code snippet, after that get a picture file name and embed in <li></li>
or <div></div>
, i've used php code to read through the folder and loop through the element to display the thumbnails and all, but it's not work well.
I've try on galleria, gallerific, galleryView jquery slideshow plugin but those might not work well with php 开发者_Go百科processing because of predefined configuration or something, can anyone tweak or hack these gallery to dynamically read an image from a folder?
There is a way to read local files using javascript, but it requires the user to set up his browser appropriately. I know about such feature in Firefox. In your case, the best way would be to use PHP for folder scan and Lightbox for image display (which in turn has slideshow plugins).
Perhaps you'd be better of saying what didn't work well when you tried the PHP path and we can help you fix that?
Your best bet is probably going to either be an existing thing such as Gallery as powtac mentioned, or if you are only wanting to display images from a single folder that might be a bit of overkill.
You could use PHP to output the thumbnails and whatever other information you need into a list of <li>
tags, use CSS to hide some of them (if required) and then use Lightbox or any of the many other JS image galleries available to do what you want.
Then you can ask on here if you are having trouble with one of those steps (detailing what you are doing, what's going wrong etc).
精彩评论