Toggle buttons lighting up

Hello,

The issue occurs on this page: http://faithlead.luthersem.edu/classes/
The buttons on top are toggle buttons and they lead to sections below. Some sections are hidden right now because we have no content for them.
The issue is that, for example, the Faith Formation button lights up when you scroll down a little bit, and stays like that until you scroll back to the top. We assume that is because it ‘detected’ the hidden section and indicates we are currently ‘on’ that section.

Is there a way to remove that? We do not want the buttons to change when you come to the section where they are supposed to lead.

Thank you!

Hi @INcroatia,

Thank you for reaching out to us. To fix this, try adding the following code in the Theme Options > JS:

(function($){
  $(window).on('scroll', function(){  
	var section = $('.x-currently-active').attr('href');
	if(section !== undefined) {
		var section_id = section.split("#");
		if( $('#' + section_id[1]).is(':hidden') ) {
			$("a.x-currently-active").removeClass('x-currently-active');
		}
	}
  });
})(jQuery);

Don’t forget to clear all caches including your browser’s cache after adding the code. Let us know how this goes!

That worked like a charm! Thank you so much!

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.