Textarea value selection

Textarea value selection

Hello, i have multiple divs like this one:
  1.                                             <div class='container'>
                                                    <textarea class='message'></textarea>
                                                    <input type='button' class='button_class' value='Post' />
                                                </div>


what im trying to do is to get the textarea.message value everytime i click on .button_class ...
the problem is that i have multiple textareas so i want to get the textarea value where the button is pressed not the first one or another..

this is what i have tried so far:
  1. $(".button_class").click(function() {
  2.       var text = $(".message").val();
  3.       console.log(text);
    });
this works but only for the first div .. it doesnt for the others the textarea value keeps saying (an empty string) if the first textarea is empty..

how can i solve this?

thanks.