Closed lacross01 closed 7 years ago
It does. How bizarre.
Ah... The browser scrolls to Blair specifically. When I add the scroll to have the page scroll to the active team member I didn't realise that I activate Blair as default on the first load.
I changed the trigger event to be 'functional'. This should fix it.
section_team__cards.click(expandTeamCard);
section_team.find('.blair').first().trigger('click',[true]);
function expandTeamCard(e, trigger) {
if (section_team__expanded_card) {section_team__expanded_card.removeAttr('style')}
section_team__expanded_card = $(this).parent('li');
var content = section_team__expanded_card.find('.li_card__content'),
li_expander = $(this).nextAll('.li_expander');
if (section_team__expanded_card.hasClass('li_expanded')) {
section_team__expanded_card.removeClass('li_expanded').removeAttr('style');
li_expander.css('visibility', 'hidden');
} else {
section_team.find('.li_expander').css('visibility', 'hidden');
section_team.find('.li_expanded').removeClass('li_expanded');
section_team__expanded_card.addClass('li_expanded').height($(this).height() + content.height() + 50);
content.css('opacity', 0).animate({opacity: 1});
li_expander.css('visibility', 'visible');
if (trigger != true) {
body__inner.animate({ scrollTop: body__inner.scrollTop() + section_team__expanded_card.offset().top - 70 });
}
}
}
Please test on different browser and close if fixed.
When you enter geolytix.co.uk it goes straight to team section