How to move lists

前端 未结 3 1038
耶瑟儿~
耶瑟儿~ 2021-01-29 07:20

I have something like this:

  • 1
  • 2
  • 3
<
3条回答
  •  佛祖请我去吃肉
    2021-01-29 07:43

    This should do the trick for you.

    var length = $('ul li').length;
    
    while (length--) $('ul').append($('ul li')[length]);
    

    Here is a working jsfiddle

提交回复
热议问题