Not a duplicate. I've tried the suggested post, it still doesn't work.
I have a page which allows me to select some users from a list of available users which is listed in a div
<div id='external-events'>
      <h4>Available users</h4>
      <div id="emyevent">
          <div class='fc-event'>Roddy</div>
          <div class='fc-event'>Robert</div>
          <div class='fc-event'>Bob</div>
          <div class='fc-event'>John</div>
    </div>
</div>
When the user clicks on one of the user in the div elements it moves into another section as a selected user and removes it from the list of available users
<div id='internal-events'>
    <h4>Selected</h4>
    <div id="imyevent">
    </div>
</div>
I use the following code to do this
$("#external-events .fc-event").click(function(){
    var title = $(this).text();
    $("#imyevent").append("<div class='fc-event' style='margin: 10px 0;cursor: pointer;'>"+title+"</div>");
    $(this).remove();
});
The issue I have is now, if the person made a mistakes he/she clicks on the selected user and the selected user chosen returns to the available user section. I thought it would have been as simple as using this
$("#internal-events .fc-event").click(function(){
    var title = $(this).text();
    $("#emyevent").append("<div class='fc_event' style='margin: 10px 0;cursor: pointer;'>"+title+"</div>");
    $(this).remove();
});
But I'm obviously doing something wrong since it isn't work. Can somebody help please.
Thanks, Roddy
