How to order (sort) a
  • list with numeric content?
  • 后端 未结 6 2068
    一个人的身影
    一个人的身影 2020-12-19 05:14

    I have a list as below that is created dynamically:

    6条回答
    •  清歌不尽
      2020-12-19 05:47

      Using sortContent plugin ,everything will be easy,clean and ready for reuse :

       $('ul').sortContent({helper:myhelper});
      

      Known that :

      myhelper=function(e){
         return $('a',$(e)).attr('href');
      }
      

      DEMO


      If you want to discover other options , visit Plugin HOMEPAGE

    提交回复
    热议问题