Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:30:06+00:00 2026-06-17T13:30:06+00:00

I have a slide out div that I’m hiding/showing via CSS positioning, and using

  • 0

I have a “slide out” div that I’m hiding/showing via CSS positioning, and using jquery to toggle a class that sets the hidden/shown state of the div.

That’s all working great. What I’m now trying to do is have any link farther up on the page change the class to show the div, and jump down the page to it.

Here’s what I have :

$('a[href="#request-trial"]').click(function () {
  $("#request-trial").toggleClass("on off");
});         

The problem is it’s first jumping to the anchor, and then changing the class, so it’s jumping to the position of the div when it’s “off” instead of when it’s “on” – does that make sense? Does anyone have any suggestions?


adding some extra info:

HTML:

<section class="form-popup on" id="request-trial">
<div class="container">
<h1>Let's Talk more!</h1>
<p>Have a project in mind or have an organizational challenge you need assistance in tackling? Get in touch... we’ll discuss ways that the Beyond Nines team could help.</p>

<a class="close">Close</a>
</div>
</section>

Link is something like:

<a href="#request-trial">Sign up</a>

Css:

.form-popup,
.form-popup.on {
position: absolute;
height: 500px;
z-index: 0;
bottom: 0px;
opacity: 1;
 }

 .form-popup.off {

 bottom: -580px;
 opacity: 0;

  }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:30:07+00:00Added an answer on June 17, 2026 at 1:30 pm

    Here is my code

    $('a[href="#request-trial"]').click(function(evt) {
      evt.preventDefault();
      var target = $("#request-trial");
      target.toggleClass("on off");
      if (target.length > 0 && target.hasClass("on"))
      {
         $("html, body").animate({
             scrollTop: target.offset().top - $(window).height()
         }, 500);
      } 
    });   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Tab Slide Out Jquery plugin. http://wpaoli.building58.com/2009/09/jquery-tab-slide-out-plugin/ I have one tab that
This is what I have and it works: $(function(){ $('.slide-out-div').tabSlideOut({ tabHandle: '.handle', //class of
<script type =text/jscript > $(function(){ $('.slide-out-div').tabSlideOut({ tabHandle: '.handle1', //class of the element that will
I have implemented a slide out div on my site that sits on the
I have a page that is laid out using DIV s, and it essentially
I have JQuery slide in-out div, which slides in-out on click of a button
I have a div that I slide in and out. To do this I
I have an Fx.Slide instance that loads content via ajax and then slides open
I have a series of divs that slide down using -webkit-transform from a negative
Using a jQuery effect, I have a layer that has a collection of HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.