Before doing the project for these several methods are always a little vague, especially prepend and prependto;
1.append
<style> span{ background:yellow; } . test{ background: #ccc; height:50px; } . test_1{ background:red; } </style><body> <div class= "test" ><span class= "test_1" > I'm standing right here </span></div ></body><script> $ ('. Test '). Append ("<span> I am testing fast </span>"); </script>
The append is the inside of the insert element behind
2.appendTo
$ (' <span> I am testing fast </span> '). AppendTo ($ ('. test '));
And the same effect as above, is to change the wording
3.prepend
$ ('. Test '). Prepend ("<span> I am testing fast </span>");
This method contrasts with the append.
Append is the inside of the inserted element, and prepend is the first inside of the inserted element.
4.prependTo
$ (' <span> I am testing fast </span> '). Prependto ($ ('. test '));
The effect above is the same as in prepend
About the difference between append,appendto,prepend,prependto