Q:

Grap elements with jquery that are created with ajax

I'm having a hard time handling following issue.
I have a page where I'm listing people that are currently followed by certain user. There is also a field, in the same page for searching, new contacts. Result of this search is presented on the same place where already followed contacts are, using the AJAX. 
Both types of people (already followed once and the once returned by AJAX) have follow/unfollow button.
Problem is that this button is not working for the contacts that are returned by AJAX.
Here is part of the code that is handling this:
$(document).ready(function (){   
    // ---------- contact search --------------
    $("#searchContacts").keyup(function(event){
        if (event.keyCode == 13){
            document.getElementById('fillText').innerHTML = "";
            var searchValue = $("#searchContacts").val();
            var userID = $("#userID").text();
            if (searchValue != ""){
                if (window.XMLHttpRequest){
                    xmlhttp = new XMLHttpRequest();
                } else {
                    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
                xmlhttp.onreadystatechange = function(){
                    if (xmlhttp.readyState==4 && xmlhttp.status == 200){
                        document.getElementById('fillText').innerHTML = xmlhttp.responseText;
                    }
                }
                xmlhttp.open("GET","searchContacts_server.php?contact="+searchValue+"&userID="+userID,true);
                xmlhttp.send();
            }
        }
    });

    // ---------- follow user -------
    $(".followButton").click(function(){
        var userIDToFollow = $(this).attr('name'); 
        var userID = $("#userID").text();  // getting userId from hidden filed on the page

        if (window.XMLHttpRequest){
            xmlhttpAdd = new XMLHttpRequest();
        } else {
            xmlhttpAdd = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttpAdd.onreadystatechange = function(){
            if (xmlhttpAdd.readyState==4 && xmlhttpAdd.status == 200){
                $("input[name='"+userIDToFollow+"']").val('Following');
            }
        }
        xmlhttpAdd.open("GET","followContacts_server.php?userIDToFollow="+userIDToFollow+"&userID="+userID,true);
        xmlhttpAdd.send();
    });
}); 

A:

Use event delegation so that the AJAX ones can work too:
Change:
$(".followButton").click(function(){

To:
$(document).on("click", ".followButton", function(){

