I’ve got a function that appends a to an element on click. The function gets the text of the clicked element and assigns it to a variable called
to an element on click. The function gets the text of the clicked element and assigns it to a variable called
if($("#id").length) /*exists*/ if(!$("#id").length) /*doesn't exist*/