I would like to copy some LI’s from one UL to another UL.
In my first UL I have 10 LI’s and I would like to CUT 6,7,8,9,10 to another div.
How do I achieve it in jQuery ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do these easily with
.slice[docs] and.appendTo[docs]:This will move the list elements to the other list. If you want to copy them, add
.clone[docs].If you want to move non-consecutive list elements, you have to select them differently.