Linked Questions

4 votes
1 answer
2k views

How can I move to an anchor on a page when I'm using Sammy.js? [duplicate]

Possible Duplicate: How to scroll HTML page to given anchor using jQuery or Javascript? I'm using Sammy.js, and it handles all the client-side URL navigation. I want to navigate to /page#fragment,...
Paul Biggar's user avatar
  • 28.4k
0 votes
4 answers
197 views

how to visit my site by .xyz.com/#divname, can any one help me? [duplicate]

I want browse directly to my site div by this way: www.xyz.com/#divname some sites I saw , I know there is a way to do it ,can anyone tell me the code I have tried window.location.href=#divname ...
Abdullah's user avatar
0 votes
1 answer
118 views

HTML jump to content by links in nav column [duplicate]

in the navigation column on the left of this site: https://github.com/orderedlist/minimal (which is implemented as <ul> <li><a href="... I would really like to be able to ...
Julius Baer's user avatar
98 votes
9 answers
75k views

What is the difference between srcdoc="..." and src="data:text/html,..." in an <iframe>?

For example, which is the difference between these: <iframe srcdoc="<p>Some HTML</p>"></iframe> <iframe src="data:text/html,<p>Some HTML</p>"></iframe> ...
Oriol's user avatar
  • 284k
7 votes
4 answers
72k views

How to scroll to div after click on About or Contact in my menu?

How to scroll to div (e.g: #about, #contact) after click on About or Contact in my menu? <div class="masthead"> <ul class="nav nav-pills pull-right"> <li class="active">&...
vavelde's user avatar
  • 129
9 votes
1 answer
7k views

Automatically scroll to a div when Flask returns rendered template

I want to scroll to a specific div on the rendered template. I know I can add an anchor like #something, but I'm rendering the template, I can't change the url. How can I do this? <div id="...
Su Vr's user avatar
  • 93
9 votes
4 answers
18k views

How to scroll a React page when it loads?

I want to pass a value as the hash in the url (myapp.com#somevalue) and have the page scroll to that item when the page loads - exactly the behavior of using a hash fragment since the beginning of the ...
Dan Cancro's user avatar
  • 1,431
2 votes
6 answers
12k views

How do I close a Modal window and automatically navigate to Anchor using the same link?

I'm using Bootstrap 3.0 and I have an open Modal window with two 'buttons' at the bottom, one says 'Contact Us' and the other says 'Close'. When someone clicks the 'Contact Us' button I want the ...
Metzed's user avatar
  • 480
7 votes
3 answers
2k views

Mousemove / scroll to next hash

I added the following code in order to scroll with my mouse (scroll on click+drag, not by the mousewheel). So far, so good - works like a charm: var clicked = false, clickY; $(document).on({ '...
user avatar
0 votes
3 answers
2k views

Wicket: tell the browser to scroll to certain tag (anchor)

We are using Wicket and our generated pages are quiet long (a lot of vertical scrolling). Some links or form's onSubmit methods invoke just perform some actions on the database and show the same page ...
Thomas S.'s user avatar
  • 6,206
1 vote
2 answers
2k views

How to navigate to an element in a page using javascript without changing page hash

I need to navigate to the element 'divElem1', on click of a button. Is it possible? If we enter this link in browser, http://myUrl#divElem1, browser will navigate to the page and to the DIV element '...
teknochamp's user avatar
2 votes
3 answers
1k views

Is a js event emitted when a css font is swapped?

Can I tell when a font has been successfully (or otherwise) loaded, and then act on that with JS? Context I'm printing a series of documents using playwright. I'm currently loading these fonts https://...
Ben's user avatar
  • 13.2k
0 votes
2 answers
5k views

How to smooth scroll using location.hash?

I'm trying to put a smooth scroll in location.hash, but it seems it's not working. How to fix this? JS function test_function(){ window.location.hash = '#divid'; jQuery(document).ready(...
User014019's user avatar
  • 1,227
2 votes
3 answers
768 views

Bookmark element in Chrome devtools

I am debugging a big DOM with devtools: I would like to "boomark" this div, so I can jump to it again easily. It would be great if this bookmark would survive a page reload. Is there a way ...
guettli's user avatar
  • 27.8k
2 votes
1 answer
2k views

Page scroll in webdriver

How to scroll page using webdriver directly. I know how to scroll using javascript executor. My question is, can it be done without using java script?? With java script I was using following: ...
MHH's user avatar
  • 95

15 30 50 per page