How to append textarea if span have data action in jQuery

Below is an example of jQuery code that appends a textarea if a span element has a data-action attribute with the value custom-new-field. This code uses jQuery to add a click event listener to the span element. When the span is clicked, it checks if a textarea with the class custom-textarea is already present. If not, it appends a new textarea to the parent of the clicked span. The textarea is given the class custom-textarea and set with some default rows and columns.