jQuey bind does not take dynamically inserted elements into account

jQuey bind does not take dynamically inserted elements into account

To make it simpler, i've got a div that I populate with buttons (via AJAX), each button has an ID of some table row.
It looks like this:

<div id="mydiv">
</div>

and buttons are defined like this:
<input type="button" id="1" do_something="1" />

Now what happens - when page loads, I'm inserting buttons in that div with "id" attribute changed depending on some row within the database table.

So what's the problem?
If I have code like this:

$("input[do_something]").bind('click', function() { alert("Button ID is: " + $(this).attr("id")) });

it all works fine. Now, when I add another entry in the database and when I dynamically append yet another button - even tho it has the attribute "do_something" - the click action on it does nothing.
I know how to get around this "problem" by adding bind action after I've inserted that button but it's literally duplicating my work.
Is there way around this so that every newly inserted element has the action "click" bound to it if it fits the selector?