Skip to content

Instantly share code, notes, and snippets.

@jp26jp
Created November 15, 2016 06:01
Show Gist options
  • Select an option

  • Save jp26jp/c12e25de363085a2d3a723ece9192987 to your computer and use it in GitHub Desktop.

Select an option

Save jp26jp/c12e25de363085a2d3a723ece9192987 to your computer and use it in GitHub Desktop.
Find each ul and increase the data-index value
$('ul').find('ul').each(function(idx){
$(this).attr('data-index', idx);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment