How To Add li In An Existing ul Using jQuery




Here we consider how to add a list item in an existing ul using jQuery.
Lets start with one example here.
Suppose we have an unordered list as shown below.

How To Add li In An Existing ul Using jQuery, Add li In An Existing ul Using jQuery, Add li In An Existing ul In jQuery, Add li In An Existing ul, Add li In An Existing unordered list, Add list In An Existing ul, Append li In An Existing ul Using jQuery, Append li In An Existing ul, How To Append li In An Existing ul, jQuery, HTML, PHP

We would like to add following li to this ul.

How To Add li In An Existing ul Using jQuery, Add li In An Existing ul Using jQuery, Add li In An Existing ul In jQuery, Add li In An Existing ul, Add li In An Existing unordered list, Add list In An Existing ul, Append li In An Existing ul Using jQuery, Append li In An Existing ul, How To Append li In An Existing ul, jQuery, HTML, PHP

For adding more li to ul, we can make use of jQuery append.
First of all, find the ul by using its ID.
And then use jQuery append as shown here.

$(".parent").append(' <li> <a href=" http://twitter.com " > Twitter </a> </li> ');




That's all, by using jQuery append, we can add li in an existing ul.