Sort Table Rows according to table data

前端 未结 3 604
梦谈多话
梦谈多话 2021-01-13 16:49

For example, I have a code:

3条回答
  •  佛祖请我去吃肉
    2021-01-13 17:31

    Instead of

    return 1 * $(a).find('.sort').text() < 1 * $(b).find('.sort').text() ? 1 : 0;
    

    insert

    return 1 * $(a).find('.sort').text() < 1 * $(b).find('.price').text() ? 0 : 1;
    

    http://jsfiddle.net/E56j8/

提交回复
热议问题
name price