Menu icon Foundation

Developer | East Sandwich, MA

Front-End Development and UI/UX Design has been a personal and professional passion of mine for over 15 years. Its synthesis of art and problem-solving lets me utilize my strengths as both a Web Developer and a Graphic Designer.

My Posts

No Content

My Comments

Doug Richar commented on Karl Robinson's post over 4 years

Just change the scrollTop to the offset().top of the accorion element itself, not just the accordion panel you're expanding:

 setTimeout(function() {

  var hash = window.location.hash;
  if (hash != ''){

    $('a[href="'+ hash +'"]').trigger('click.fndtn.accordion');

    $('html, body').animate({
      scrollTop: $('ul.accordion').offset().top
    });
  }
}, 600);

Or the accordion label/header you're using if one exists

 $('html, body').animate({
      scrollTop: $('h4.my-accordion').offset().top
    });

Posts Followed

No Content

Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on Karl Robinson's post over 4 years

Just change the scrollTop to the offset().top of the accorion element itself, not just the accordion panel you're expanding:

 setTimeout(function() {

  var hash = window.location.hash;
  if (hash != ''){

    $('a[href="'+ hash +'"]').trigger('click.fndtn.accordion');

    $('html, body').animate({
      scrollTop: $('ul.accordion').offset().top
    });
  }
}, 600);

Or the accordion label/header you're using if one exists

 $('html, body').animate({
      scrollTop: $('h4.my-accordion').offset().top
    });

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content