1

I have a textarea with an image of a camera that when clicked allows a user to select an image to upload.

What I want to do is be able to tell when a file is selected so I can perform some actions using jquery on the textarea such as expand it and display the photo with a space underneath for micropost text.

I've never done this before and not quite sure how to go about doing so. I would appreciate some ideas/solutions if possible.

Thanks Kind regards

LondonGuy
  • 10,199
  • 10
  • 73
  • 147

1 Answers1

3

Once the file is selected the input for the file will be changed, so you could use the .change() method to register the change and perform actions. http://api.jquery.com/change/

Jay Blanchard
  • 33,530
  • 16
  • 73
  • 113
  • Yep found the answer in another question. Thanks for your response. For anyone else who stumbles across this question here is where I found my solution: http://stackoverflow.com/questions/5670769/jquery-detecting-if-a-file-has-been-selected-in-the-file-input – LondonGuy May 04 '12 at 12:48