hi
i want to click the appended <li>

i append a <li> into <ul>

and now i want to click them but it's don't work fine

here is my append code JQ :
Code:
$('li').append($('<p>').text(post.w_name).attr('name','post_'+post.w_id).attr('id','post_'+post.w_id).addClass('f_ok'));
and here my html code :

Code:
<ul dir="rtl">
    <li><h1>Online</h1></li>
</ul>

i want to do this :
Code:
            $('li p').click(function(){
                alert($(this).text())
            });
it's don't work with me help

and thanks