In a wordpress site when the user one clicks on a link, the user will be redirected to the next page where a specific anchor name is hard coded so the user will land on that section.
I am working on a wordpress default script that scrolls to top.
I would like to stop scrolling when a user lands on the page with an anchor name.
http://example.com/services/ -> scroll to top
http://example.com/services/#digital -> do not scroll to top
Related
I have a website about a factory of chocolates, I'm working in Laravel and PHP. In my website I have a login, and different types of users.
Until there is every ok. If I login as an admin. The website shows the administration control panel as home page. In this site I have a menu with many operations for only admin users.
For example I have a menu about add new users. The url of the menu in the top bar navigation is:
localhost/BestChoco/NewUsers
And in this menu I have a button that redirect to another view that is a form to add new users.
Now th url is:
localhost/BestChoco/NewUsers/create
Is in this case, for example, I want to prevent the user, type in the top bar that url.
If the user type localhost/BestChoco/NewUsers/create in the top navigation bar, without visited the page of users, the website redirect automatically to the home page.
The home page is called index.blade.php Is the same for all user but the content changes depending on the user logged in. How can I do it?
No. The page cannot control default browser navigation bar behaviour.
You should be using a permissions-based method to kick unauthorized users out of that page if they manage to navigate there. You must manage this via your PHP code.
I am creating a navigation bar for a website and I would like the button to link to the contact section on my homepage (index.html). Currently if you are on the page that has my portfolio and want to go to this section it just goes to the top of my homepage rather than the contact section which is about halfway down the page (has the alt id "#contact."
I currently have this code in my navbar class:
CONTACT
How can I make it go directly to an element with an ID from a link on an external page?
Do this:
CONTACT
I'm using Bootstrap to create a single page portfolio, I'm using bookmark links to navigate the page, however I want the page to land earlier than the position it lands on, I am pointing to the div I assigned the Id to it. is there anyway to do it?
Let's say, you want to go to footer on click of Goto Footer link
Goto Footer
Then, the footer block should have
<div id="footer-block">Page Footer</div>
I have a problem in a site made with bootstrap
If I set an href tag from an external page that landing on a section of my page, I have a strange behavior : the link sends me to the correct section but the navbar at the top of the menu marks the next item.
If the same link is typed directly from browser, instead, everything is working fine (the positioning of the page and the navbar menu).
I am trying to create a horizontal parallax site. Everything is working nicely, when I click the menu the slides move swiftly to the horizontal direction and the corresponding slide is displayed.
I have an external HTML page, that has the same structure as the main site and the problem is that when I click this page's menu, it goes to the site but lands on the first slide.
I want a script so that when I click on this external HTML page link, the page should land on the site, but then it should slide to the corresponding slide.
Main menu link looks like this:
<a onclick="HORIZONTAL.ANIM.instance.move(3);" id="sec4" href="javascript:void(0);">About Us</a>
I want to click on About Us link on external page and then it should land on the main site and then the above script should run and slide should move.
First refer user to new page ( for example http://newpage.com" )with slide id in hash.
About Us
in that new page create a script after page loads that slides to specified slide passed.
window.onload = function() {
var id = window.location.hash.substr(1);//get id from url after hash
HORIZONTAL.ANIM.instance.move(id);
};