Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save developer-anuragsingh/21cbf5d6d0838be7ba7be6c6e100e4da to your computer and use it in GitHub Desktop.

Select an option

Save developer-anuragsingh/21cbf5d6d0838be7ba7be6c6e100e4da to your computer and use it in GitHub Desktop.
// Add same class in each li
jQuery(document).ready(function() {
jQuery('#menu-primary li a').each(function() {
jQuery(this).attr("class", "nav-link");
});
});
// Add class in each li
jQuery(document).ready(function() {
jQuery('#menu-primary li a').each(function(n){
jQuery(this).attr("class", "nav-link" + n);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment