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 7492321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:24:59+00:00 2026-05-29T16:24:59+00:00

I’m wondering and trying to have it so once the user clicks a link

  • 0

I’m wondering and trying to have it so once the user clicks a link within my menu, the page loads by coming in from the top of the page, sliding in vertically. EG; Click link > New page nicely (maybe easing) into position from top out of frame.

I know this is possible with .slide in jQuery, but I’m not having any luck thus far.

I’m trying to do this in a WordPress site.

Any suggestions?

Spawning from original question at: Getting page content via wrapper in WP to slide in

  • 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-05-29T16:25:01+00:00Added an answer on May 29, 2026 at 4:25 pm

    Here’s a quick, almost completely codeless explanation for how I do that on one of our sites…

    Requires jQuery, basic ajaxing and a custom template.

    For wordpress you will want to create an ajax handler to query your post, page or whatever it is you’re loading in. You first make a new page and title it ajax_handler or whatever you will find useful. Then you make that page private so it doesn’t show up in your menu.

    Then you need to create a custom handler, which in this case is simply a custom template. To do so you could just copy page.php and rename it to ajax_handler.php then add the standard template comment so it will show up in your template list and remove anything that is specific to the page.php file – essentially empty the file so you don’t call anything you don’t want at this point but keep the basic wp direct call provisions in place.

    Then you assign that template to your new page.

    Within that page you can make a simple statement like…

    if(isset($_GET['request']))
    {
        switch($_GET['request'])
        {
            case "article":
                // run the wp query to fetch whatever it is you're trying to load in
    
                die(json_encode(array("title" => "test", "body" => "sample content")));
    
                // obviously you would encode the results from the query
            break;
            default:
    
            break;
        }
    }
    

    then on your site you would have a jquery listener or event that makes the ajax call…

    $(document).ready(function(){
        $('#link').on('click', function(){
            $.ajax({
                'url': 'http://www.yourdomain.com/ajax_handler', //whatever your permalink to that new page is
                'type': 'get',
                'data': {id:'1', request: 'article'}, //whatever the id is you want. You can fetch this any number of ways so I assume you know how to do it
                'dataType': 'json',
                'success': function(data){
                    $('#slider_div h1').html(data.title);
                    $('#slider_div p').html(data.body);
                    $('#slider_div').animate({top: '0%'}, 1000);
                }
            });
        });
    });
    

    and finally your html would have a simple div that is just pushed above the page with basic css…

    <div id="slider_div">
        <h1>title to replace</h1>
        <p>body text to replace</p>
    </div>
    

    and the css:

    #slider_div{
        width:100%;
        height:100%;
        background:#fff;
        position:absolute;
        z-index:999;
        top:-100%;
    }
    

    This answer assumes you have some idea of what you’re doing. I tested none of it but I actually helped someone make this same kind of thing today. The html and css may vary but the concept is still the same. hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I have a view passing on information from a database: def serve_article(request, id): served_article
I have a bunch of posts stored in text files formatted in yaml/textile (from
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.