jquery gallery and HTML element to hold the information
I'm trying to build just another gallery. There is lots of them but I didn't find anyone that actually supported my need, and beside I like to learn.
Basically I want the first picture in my gallery displayed (in full size). When I press the navigation arrow (Let's say it's just below the image) I want the next picture to show. Nothing strange w开发者_开发知识库ith that.
The gallery should allow the image, an alt-text set and a caption.
However I want the option to NOT pre load the images that has not yet been displayed. Therefore it looks like I cannot use the tag witch otherwise would support all my needs. Would it be bad practice to substitute the -tag with the following:
<a href="srcforpic.jpg" title="alt text">Caption goes here</a>
The Jquery would then parse this and create some kind of freaky object that can be used to construct an img-tag only when the that image is requested. (and stores it of course)
Pros & cons?
I did something similar with what you want few months (years?) ago. Take a look here. Is just a proof of concept, but i guess is still a good start.
well, if I were you, instead if doing that , I'd just add a "#" to all image SRCs excpet for the one that's being shown, and once the person move to next image, remove # from the src of that image, it's alot simpler and speedier than your solution
精彩评论