This method is used to append content to each matching element, which is similar to the case where JavaScript executes the AppendChild method on the specified element and adds them to the document.
The parameters are explained as follows:
Content
Content to append to the target
function (index, HTML)
Returns an HTML string that is appended to the inside of each matching element. Accepts two parameters, the index parameter is the indexed value of the object in this collection, and the HTML parameter is the original HTML value of the object.
Instance:
;} Html{font:15px/1.2em ' Courier New '; color: #666; width:750px;margin:25px auto;} ul{list-Style:none;} . Hover{color: #FF96EC;}</style><script type= ' Text/javascript ' > $(function(){ $(' Li '). Append (function(index,oldhtml) {return"+index; }); });</script>
[JQuery document processing append (CONTENT|FN)] This method is used to append content to each matching element, which is similar to the way that JavaScript executes the AppendChild method on the specified element, adding them to the document.