Reloading new content while scrolling

前端 未结 1 1418
醉话见心
醉话见心 2021-01-26 01:06

Im using the following jQuery, which sets the id of the last item in a UL to \'last_item\'.

function oldest() {
 j(\'ul li:last-child\').addClass( \'last_item\'          


        
相关标签:
1条回答
  • 2021-01-26 01:18

    You'll need to remove the original "last_item" class from list item before you add it to the new last item...

     j('ul li').removeClass( 'last_item' );
    
    0 讨论(0)
提交回复
热议问题