HELP: query

HELP: query

hi i have below situation:

Copy code
  1. <div id="1">
  2. <img class="close">
  3. </div>
  4. <div id="2">
  5. <img class="close">
  6. </div>
like this multiple divs which have same image. 

now i want to write a jquery function, the divs which has these image, on clicking of the image, divs should hide.

i want generalize function.. $(this) wont work.so what should i give here.. 

Copy code
  1. $(".close").click(function() {
  2. $(this).hide();
  3. });