Skip to content

Instantly share code, notes, and snippets.

@IgorGavrilenko
Created June 27, 2022 14:31
Show Gist options
  • Save IgorGavrilenko/b4a26cb5412da2f144afa6d32a8ee28b to your computer and use it in GitHub Desktop.
Save IgorGavrilenko/b4a26cb5412da2f144afa6d32a8ee28b to your computer and use it in GitHub Desktop.

Revisions

  1. IgorGavrilenko created this gist Jun 27, 2022.
    10 changes: 10 additions & 0 deletions нумерация
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    (function (){
    const $infoListCount = $('.info__list');
    const $infoItemCount = '.info__item';
    const $infoNumCount = '.info__num';
    $infoListCount.each(function(){
    $($infoItemCount, this).each(function(i){
    $(this).find($infoNumCount).text(('0' + (i+1)).slice(-2));
    });
    });
    })();