WordPress.org

Ready to get started?Download WordPress

Forums

Late Loading Issues With jQuery Toggle (1 post)

  1. SpicyNumberOne
    Member
    Posted 8 months ago #

    I know this is more a jQuery issue than a WordPress issue, but no one in the jquery forums got back to me. At http://development.northwestdharma.org/group-directory/ you will see the first member groups's content display without the closed jquery toggle for about a second, and then all the member groups content appear a second later and close the toggles as I and my client want them to be. What can I do to make the toggle be closed BEFORE the content loads. I know one solution is whether you put the script in the head or at the end of the html, but I'm not getting different results when I move the scripts (I may be not moving them correctly). My jQuery script call is in the head and this is my code which appears in the head as well:

    //Toggle results
    jQuery(function($) {
    	$( '.toggle-next + *' ).hide();
    	$( '.toggle-next' ).click( function() {
    		$( this ).toggleClass( 'on' ).next().slideToggle( 'slow' );
    		return false;
    	} );
    });

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 8 months ago by SpicyNumberOne
  • This topic is not resolved
  • WordPress version: 3.7.1