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

  • SEARCH
  • Home
  • 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 8525281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:55:58+00:00 2026-06-11T07:55:58+00:00

I have a one-page site and links on them like <a href=#block1>link1</a> . Browser

  • 0

I have a one-page site and links on them like <a href="#block1">link1</a>. Browser adress bar shows site.com/#block1

I want the browser gave a line like site.com/block1 and after click on link site.com/block1 browser will open scrolled page to needed block.

This jsfiddle as simple, but it isn’t work http://jsfiddle.net/26LRA/2/

There should be no magic, no php, cms, sql and different plugins. Only pure javascript/jquery

Add: I give you this site http://www.ascensionlatorre.com as that I want, but I can not understand their code

  • 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-11T07:56:00+00:00Added an answer on June 11, 2026 at 7:56 am

    You mean you want to just visibly change the url:

    $("#name0 a").click(function(e) {
        e.preventDefault();
        var id = $(this).attr('href').substring(1);
        $('html,body').animate({scrollTop: $('#'+id).offset().top}, 'fast');
        window.history.pushState("", "", '/' + id);
    });
    

    Example

    for the link to actually work you need mod_rewrite, make a .htaccess and add:

    RewriteRule ^portfolio$ /index.php/#$1 [QSA,NE]
    

    to read the URL

    var path = document.location.pathname;
    path = path.substring(path.lastIndexOf('/'), 1);
    if(path){
        $('html,body').animate({scrollTop: $('#'+path).offset().top}, 'fast');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem on my site's login page in IE7 browser. One of
Say I have a list of links in a folder, for example: http://www.site.com/folder/subfolder/subfolderfolder/hello-one.php http://www.site.com/folder/subfolder/subfolderfolder/hello-two.php
In one page of our site, I have this code: $_SESSION['returnURL'] = /store/checkout/onepage; and
I have created custom posts and I want one page in my site to
I have a WordPress site which have 4 pages with one page is a
I have google analytics on my site. One page has a button which when
I have one Page which is displaying details of some Client. I am using
I have one page with a Silverlight object on it, and many times when
I have one page website only using HTML, CSS and JavaScript. I want to
In my project I have one table with 24*6*300 cells on one page (it's

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.