Can I create a custom form elements(upload, dropdown, checkbox)?
Is it possible for me to a开发者_JS百科dd a customised upload button, like in below screenshot..
When Clicked on upload and you choose a image, a dropdown appears,
How is it done? I would like add a couple of fields and some check box like in the site for demo http:/foodspotting.com
Is there a Jquery plugin available for this?
Try uploadify Jquery plugin ...
http://www.uploadify.com/
Here u will need to use onSelect option
"The onSelect option allows you to run a custom function for each file when being added to the queue. The default function creates a new queue item for the file and places it in the queue. If the custom function returns false, the default function will not run."
More details
Let me know if it works
Why need a jQuery plugin? Showing a div with additional controls can be done in a single line of Javascript.
Basically you don't need more than a form, hide part of it using css, and show it after the button is clicked using a tiny piece of Javascript.
Of course you can use JQuery to animate it, but that's all just fancy stuff. No specific plugins needed.
See the following:
Plupload: a plugin using jQuery.
http://www.plupload.com/example_custom.php
Using this, you can customize & trigger another function which can open-up an dialog-box and you can fill-up your stuff.
精彩评论