[jQuery] error binding event with anchor tag

[jQuery] error binding event with anchor tag


Hi,
I 'm new to jQuery and 'm facing a some problem binding click event, a
function to an anchor tag.
I 've an anchor tag with ID add.
$('.add').click(function(){
                var newElem = "<li class='ui-state-default'>Temp Text Displayed<a
href='#' class='edit-widget-control'>edit</a> <a href='#'
class='remove-widget-control'>delete</a></li>";
                //alert(newElem);
                $('#widget_window').append(newElem);
            });
This works fine (adds new list item to widget_window which is
Unordered List Tag).
but the below code doesnt work... :(
$('.edit-widget-control').click(function(){
                alert('alert');
            });
            $('.remove-widget-control').click(function(){
                alert('alert');
            });
'm not sure but is it because, elements with "edit-widget-control" and
"remove-widget-control" classes are added later (on click event of
"ADD"), jQuery is unable to assign event to them.
Can anyone help me with this issue ???
Thanks :)