I noticed people using $("#div1").empty() to clear every thing inside the div, with attached events . and $("#div1").html("") to achieve the same. pls, tell me the difference between them or which one should be used.
They both deliver the same result, but the empty method is faster than setting html to an empty string.
https://stackoverflow.com/questions/17543711/jquery-difference-html-vs-empty