When the script first load, it will call Function-A(This function removes li elements, add new li elements and attach event listener to li parent, which is ul ), I also have