<p>I've been working with jQuery for a pair of weeks and I've noticed it works fine with objects that are in the original HTML document, but when I generate a new element using jQuery the library doesn't get any of its events.</p>

<p>Let's say I try to run something like this:</p>

<pre><code>$('.whatever').click(function() {
  alert("ALERT!");
});
</code></pre>

<p>If the HTML does have something like this:</p>

<pre><code>&lt;span class="whatever"&gt;Whatever&lt;/span&gt;
</code></pre>

<p>Then clicking on the word <code>Whatever</code> gets me a nice alert.</p>

<p>But if the <code>span</code> element is added dynamically using jQuery, nothing happens when clicking on it.</p>

<p>Is there a way to make jQuery work with those elements, somehow?</p>

You need to rebind it.
```
```
function bindme(){
    $('.whatever').click(function(){
        alert('binded');
    });
};

bindme();

//function that will generate something

function foo(){
   $('.whatever').val('oryt');
   bindme();//rebind itagain
}
```
```