从ajax调用运行jQuery

What I'm trying to accomplish is to call a PHP page with an ajax request when an object is clicked and from the PHP page some jQuery will be returned that will determine whether to fade or not to fade the object.

Here is the code returned by the PHP page if the object should be removed:

$attr = '#all'.$numAttr;
    echo '<script type="text/javascript">
    jQuery(document).ready(function(){  
        $("'.$attr.'").fadeOut();
        });
    });
        </script>';

Here is the jQuery code with the ajax request:

    $(document).ready(function(){  
$(".item").click(function() {
    var attrID = $(this).attr('id');
    var attrNum = attrID.substring(5)
    var itemID2 = $(testAttr).html();
    var id2 = $(testAttr+"p").html();
$.get( "http://www.refaim.com/use", {itemID: ""+itemID2, id: "" + id2, numAttr: attrNum}, function( data ) {
$(".action").html(( data ));
});
});

});

Edit: Can't believe I forgot to include why I submitted this question. My problem is that the jQuery loaded from the PHP page into a div is not working, the object does not fade when it's clicked.

in your ajax success function you can put your fadeout code depending the value is return from your php file

$.ajax({
 type: "POST",
 url: "yourphppage.php",
 data: dataString,
 success: function(msg){            
 if(msg=='your return value')
 //then do fadeOut here
 }
}); //END $.ajax

function(data) is the value returned by your PHP. you can add if statement right after the call.

$.get( "http://www.refaim.com/use", {
       itemID: ""+itemID2,
       id: "" + id2, 
       numAttr: attrNum}, 
     function( data ) {
     if(data == 'something') {
        $('<your html element>').fadeOut();
     }
});
});