• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Infinity Pro: Toggle scroll to active div ?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Infinity Pro: Toggle scroll to active div ?

This topic is: not resolved
  • This topic has 1 reply, 1 voice, and was last updated 5 years, 10 months ago by Boblebad.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 12, 2017 at 1:59 pm #202951
    Boblebad
    Participant

    Hi

    I'm all new to javascript and jQuery, so i need a little help getting this to work.

    I've bin searching around and found some things, but i'm not sure how to put them together.

    On my Guides Page i have some longer guides and when clicking another guide, the open one closes and the page scrolls up. That results in the clicked guide being scrolled out of sight. So i need the script to scroll to the open toggle(guide) ?

    I have this toggle script for my Guides Page:

    $('.top').on('click', function() {
    	$parent_box = $(this).closest('.box');
    	$parent_box.siblings().find('.bottom').slideUp();
    	$parent_box.find('.bottom').slideToggle(1000, 'swing');
    });

    When i searched, i found that there's a couple of ways to do this:

    $('#your-div').scrollView();

    And
    document.getElementById("here").scrollIntoView()

    But i'm not sure how to combine it with my script for the toggle's. It's from this link: http://stackoverflow.com/questions/1586341/how-can-i-scroll-to-a-specific-location-on-the-page-using-jquery

    All the best
    Carsten

    March 14, 2017 at 10:12 am #203080
    Boblebad
    Participant

    Anyone who knows this ?

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble