Ancla activo con JQuery

/ Published in: jQuery
Save to your folder(s)

Copy this code and paste it in your HTML
  1. $(document).ready(function(){
  2. //set class active-anchor to active anchor
  3. $('a').each(function(){
  4. if($(this).attr('href')
  5. $(this).addClass('active-anchor')
  6. });
  7. });

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.