anchor

How to use mod_rewrite with anchors but no [R=301]

半世苍凉 提交于 2020-01-07 02:53:03
问题 I have a website build on jQuery scrollTo plugin. Each page is accessible via anchor's, ie. www.domain.com/#page-one and deeper www.domain.com/#page-one--some-content . I'd like to create rule with mod_rewrite so address like www.domain.com/page-one or www.domain.com/page-one/some-content point to the above one. Its quite easy with [R=301] flag but I need my "clean" address /page-one/some-content to stay in address bar not changing to #page-one--some-content . Why I need to change them?

generating anchor and image tags for fancybox image gallery

情到浓时终转凉″ 提交于 2020-01-06 07:58:11
问题 I have a simple html page and I want to make a very simple gallery to it with fancybox. Here is the code for one image: <a class="gallery" href="img/83.jpg"><img src="img/83k.jpg" alt="" /></a> Problem is, I have 400 of them and I have to make it sequential, like: <a class="gallery" href="img/84.jpg"><img src="img/84k.jpg" alt="" /></a> <a class="gallery" href="img/85.jpg"><img src="img/85k.jpg" alt="" /></a> etc... Hand coding it would be such a pain. How can I generate all of it? Thanks!

Is there a compatible way to write href?

天大地大妈咪最大 提交于 2020-01-06 03:15:05
问题 For example, in file test.php : <a href="someting/?start=1">go</a>; so that no matter where this test.php is, whether in Document_Root/Test/ directory or in Document_Root/Production/ directory, the anchor will point to itself. 回答1: To write a link that will only change the query string, just use <a href="?foo=bar">whatever</a> So if you're at http://the/current/url.php , it goes to http://the/current/url.php?foo=bar , or if you're http://somewhere/else?entire=ly , it goes to http://somewhere

How to scroll page down after anchor navigation?

爷,独闯天下 提交于 2020-01-05 06:32:18
问题 I have added top menu as a div with position: fixed. It's placed in the top of the page, so it covers part of the content. I moved the layout down, so generally it's ok, BUT if user clicks any anchor link, the page scrolled to where the anchor is on top. But it's covered by the top menu. Is there a way to catch anchor event and process it with javascript (and jQuery if necessary)? 回答1: You can use something like this: $('a').click(function(){ $('html').scrollTop($($(this).attr('href'))

How to scroll page down after anchor navigation?

◇◆丶佛笑我妖孽 提交于 2020-01-05 06:31:48
问题 I have added top menu as a div with position: fixed. It's placed in the top of the page, so it covers part of the content. I moved the layout down, so generally it's ok, BUT if user clicks any anchor link, the page scrolled to where the anchor is on top. But it's covered by the top menu. Is there a way to catch anchor event and process it with javascript (and jQuery if necessary)? 回答1: You can use something like this: $('a').click(function(){ $('html').scrollTop($($(this).attr('href'))

How to scroll page down after anchor navigation?

依然范特西╮ 提交于 2020-01-05 06:31:27
问题 I have added top menu as a div with position: fixed. It's placed in the top of the page, so it covers part of the content. I moved the layout down, so generally it's ok, BUT if user clicks any anchor link, the page scrolled to where the anchor is on top. But it's covered by the top menu. Is there a way to catch anchor event and process it with javascript (and jQuery if necessary)? 回答1: You can use something like this: $('a').click(function(){ $('html').scrollTop($($(this).attr('href'))

Make sure <a href=“local file”> is opened outside of browser

不羁的心 提交于 2020-01-04 15:28:26
问题 For an Intranet web application (document management), I want to show a list of files associated with a certain customer. The resulting HTML is like this: <a href="file:///server/share/dir/somefile.docx">somefile.docx</a> <a href="file:///server/share/dir/someotherfile.pdf">somefile.pdf</a> <a href="file:///server/share/dir/yetanotherfile.txt">yetanotherfile.txt</a> This works fine. Unfortunetly, when clicking on a text file (or image file), Internet Explorer (and I guess most other browsers

How do you use $_GET and # anchor link at the same time?

青春壹個敷衍的年華 提交于 2020-01-04 09:27:46
问题 I have a form that redirects to the original form page with $_GET to display any errors. But the form itself is place lower down the page. What is the correct way to use both? I tried www.abc.com/index.php?error=missing_input&#review 回答1: Yep, it's definitely working for me: <?php if (!isset($_GET['submitted'])) { echo "<form action='#fragment'><input type='text' name='text'><input type='submit' name='submitted' value='Do it'></form>"; } else { echo "<div style='height: 800px'>Vertical

How do you use $_GET and # anchor link at the same time?

[亡魂溺海] 提交于 2020-01-04 09:27:04
问题 I have a form that redirects to the original form page with $_GET to display any errors. But the form itself is place lower down the page. What is the correct way to use both? I tried www.abc.com/index.php?error=missing_input&#review 回答1: Yep, it's definitely working for me: <?php if (!isset($_GET['submitted'])) { echo "<form action='#fragment'><input type='text' name='text'><input type='submit' name='submitted' value='Do it'></form>"; } else { echo "<div style='height: 800px'>Vertical

Get Hash URL from anchor and load into Div

廉价感情. 提交于 2020-01-04 05:34:08
问题 I have a video gallery that has a menu on the left and loads the content into a div on the right hand side. The menu is generated from php video posts so we need a general script that will effect everything. -- The problem -- The links will load the URL of the video as an anchor on the current URL - eg. http://www.divethegap.com/update/community/videos/#http://www.divethegap.com/update/2010/10/test-video-2/ So all I need is a script that will get the hash tag and load the content into a div.