change it like
function initListClickEvent() {
$("#list1 > li").click(function () {
$(this).css("background-color", "blue");
$(this).css("color", "white");
});
$("#list1 > li").trigger("click");
}
$(document).ready(initListClickEvent);
$(function () {
$("#list1").droppable({
accept: 'li',
drop: function (e, ui) {
initListClickEvent();
}
});
});
Edit
If the elements are adding dynamically, you should use event delegation for that
$(document).on("click","#list1 > li",function(){
$(this).css("background-color", "blue");
$(this).css("color", "white");
});
It helps you to attach handlers for the future elements