page-jump

How to create an anchor and redirect to this specific anchor in Ruby on Rails

丶灬走出姿态 提交于 2019-12-17 16:01:32
问题 I'm trying to create unique anchors for every comment on my blog so a person can take the url of an anchor and paste it in their browser, which will automatically load the page and scroll down to the point in the page where their comment starts. Perhaps I'm going about this the wrong way but I've tried this which was to no avail. Comment view - Fail 1 - when pasted in a browser this link does not scroll down to the desired position <%= link_to '#', :controller => 'posts', :action => 'show',

How to go to anchor tag in scrollable div without having the whole browser jump down?

你说的曾经没有我的故事 提交于 2019-12-12 14:19:43
问题 I'm building a simple glossary widget as part of a larger project for a client. The content of the glossary is enclosed within a scrollable div (overflow:auto). Each letter has an anchor tag associated with it (#a, #b, #c, etc). Above the scrollable div is a div which contains every letter of the alphabet. Clicking on one of these letters takes the user down to that letter's definitions in the scrollable div. This works, but an unintended side effect is that the entire window jumps down to

page jump from div to an anchor

让人想犯罪 __ 提交于 2019-11-30 17:45:46
I was trying to make a div jump from <a href="#FAQ">FAQ</a> to a div id and could success easily, but since I have a fixed link to jump to, I can't seem to find a way how to do that. Meaning, I want a div or a href link to jump to a url in the same page say <a href="http://www.mydomain.ask.html">Ask</a> I know for sure that jumping from an anchor such as <a href="#jump">jump</a> to a div such as <div id="jump">jump to point</div> works fine. However, how about the opposite way? does it work? I mean jumping from div id to an anchor works? As long as your anchor has an ID you can link to a

page jump from div to an anchor

∥☆過路亽.° 提交于 2019-11-30 01:47:42
问题 I was trying to make a div jump from <a href="#FAQ">FAQ</a> to a div id and could success easily, but since I have a fixed link to jump to, I can't seem to find a way how to do that. Meaning, I want a div or a href link to jump to a url in the same page say <a href="http://www.mydomain.ask.html">Ask</a> I know for sure that jumping from an anchor such as <a href="#jump">jump</a> to a div such as <div id="jump">jump to point</div> works fine. However, how about the opposite way? does it work?

How to create an anchor and redirect to this specific anchor in Ruby on Rails

一曲冷凌霜 提交于 2019-11-27 21:01:42
I'm trying to create unique anchors for every comment on my blog so a person can take the url of an anchor and paste it in their browser, which will automatically load the page and scroll down to the point in the page where their comment starts. Perhaps I'm going about this the wrong way but I've tried this which was to no avail. Comment view - Fail 1 - when pasted in a browser this link does not scroll down to the desired position <%= link_to '#', :controller => 'posts', :action => 'show', :id => comment.post, :anchor => 'comment_' << comment.id.to_s %> Comments controller - Fail 2 - Correct