I am writing a script which lets user search and find images from a url. I got it, and can get the urls of the images (one or more) in an array. I want to show one image at a time, with <<prev and next>> buttons and provide an upload button in a form.
Any hints on how to implement an inline slideshow, and upload the image that user has selected?
eg:
<div id="imgSelected">
<img src="img1.jpg">
<img src="img2.jpg">
</div>
<form>
<input type='hidden' value='img1.jpg>
<input type=text' placeholder='title'>
<input type='submit' value='upload'>
</form>
I can use something like jquery cycle (http://malsup.com/jquery/cycle2/) to show the next/ prev buttons and cycle the image. but when that happens, how can I update the value in the form for the image src?
You could try something like this:
http://jsfiddle.net/EpjYe/
Of course you’d have to use consistent
idandclassattributes, as mine is only an example.