Write a script with jQuery which takes the entered text and prints it in a span below on button click.
It is allowed to add tags, IDs or classes. Although the existing ones must be preserved. The solution is possible without doing that.
- jQuery Selectors
- jQuery Event handling
- basic DOM manipulation
on Codepen
An explanation is attached to each solution. In this tutorial the solutions are ranked. Although all solutions will work, the first solution is the "worst" and the last solution is the "best". This has been done to provide the approach to the solution. Further lessons will base on the third solution.