anchor

HTML named anchor not working more than once on iPhone

隐身守侯 提交于 2020-03-04 02:31:37
问题 The named anchor at the bottom of the page doesn't work more than once on an iPhone. Any suggestions? Thanks, Andy. <html> <head> <title>anchor scroll test</title> <meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/> <meta http-equiv="content-type" CONTENT="text/html; charset=UTF-8"> <meta name="author" content="Andy Cheeseman"> </head> <body> <a name='top'></a> <div id='page_title'>iPhone Optimised Site</div> <div id='note'>Presently, iPhones

Update anchor tag as you scroll past an element in a div

天涯浪子 提交于 2020-02-06 06:32:48
问题 I am not sure if this is possible that is why I am on here asking so if you have any ideas on how this would be possible then I would greatly appreciate it! Ok say that I have a div that scrolls with overflow-y feature. And say that inside of this div there is a story or large amount of text. Is there anyway to have Javascript memorize or save where you are at in this div maybe through a line number or anchor tag possibly? That way whenever the div is gone, such as if I had javascript change

Can I use an anchor ID starting with a number in HTML5?

陌路散爱 提交于 2020-02-03 09:38:43
问题 Can I use an anchor ID starting with a number in HTML5? <a id="1" class="anchor"></a> I was told this was a NO NO. But it seems to work fine in IE9, Firefox and Chrome. So, what gives? 回答1: Yes, this is perfectly valid in HTML5. 3.2.3.1 The id attribute The id attribute specifies its element's unique identifier (ID). [DOM] The value must be unique amongst all the IDs in the element's home subtree and must contain at least one character. The value must not contain any space characters. Note:

How do I run PHP code when a user clicks on a link?

南笙酒味 提交于 2020-01-26 08:48:35
问题 I want to have a page run some PHP code when a user clicks on a link, without redirecting them. Is this possible with <a href=""></a> or with the javascript onclick event? 回答1: Yeah, you'd need to have a javascript function triggered by an onclick that does an AJAX load of a page and then returns false, that way they won't be redirected in the browser. You could use the following in jQuery, if that's acceptable for your project: <script type="text/javascript" src="jquery.min.js"></script>

How do I run PHP code when a user clicks on a link?

跟風遠走 提交于 2020-01-26 08:47:35
问题 I want to have a page run some PHP code when a user clicks on a link, without redirecting them. Is this possible with <a href=""></a> or with the javascript onclick event? 回答1: Yeah, you'd need to have a javascript function triggered by an onclick that does an AJAX load of a page and then returns false, that way they won't be redirected in the browser. You could use the following in jQuery, if that's acceptable for your project: <script type="text/javascript" src="jquery.min.js"></script>

Affixed header overlap solution causing other overlap issues

时间秒杀一切 提交于 2020-01-25 20:36:06
问题 I'm trying to create an affixed header using Bootstrap's Affix. I've got my nav bar to affix properly, but I then run into an issue when I user anchor links; the nav bar overlaps the anchor link text when it first loads up. I've found a solution to that here, and in particular I'm using this comment (because I want the anchor text to be visible). However, that solution makes the link be placed on top of the html before the anchor link, meaning that if I click anywhere there I end up

Android Mozilla FireFox not opening page in a new tab

我的梦境 提交于 2020-01-25 08:11:21
问题 We have a link that we get from server (Url) and we want to open it in new window. We are using following code to do that: <a class="block img-holder usedsearch-img-holder position-rel no-direct" target="_blank" href='/m@(Url)'> This is working fine but is not opening new window in mozilla firefox. I read similar issue and workaround by using onclick here. Only problem is that bots (especially non-google search engines) might not be able to index these pages. How can we achieve both i.e. open

Android Mozilla FireFox not opening page in a new tab

拈花ヽ惹草 提交于 2020-01-25 08:11:10
问题 We have a link that we get from server (Url) and we want to open it in new window. We are using following code to do that: <a class="block img-holder usedsearch-img-holder position-rel no-direct" target="_blank" href='/m@(Url)'> This is working fine but is not opening new window in mozilla firefox. I read similar issue and workaround by using onclick here. Only problem is that bots (especially non-google search engines) might not be able to index these pages. How can we achieve both i.e. open

PHP Header Location - redirect to URL with HTML anchor

女生的网名这么多〃 提交于 2020-01-25 05:24:05
问题 I have a website, where after submission of a form user is redirected throught Header Location to the same page but with anchor to fill in another form. Header('Location: http://www.topdodavatel.cz/tuzby/tuzby.php#nechaj'); However, when the first form is submitted, the user is not landed on the anchored DIV, but on the bottom of page. As you can try on development version http://www.topdodavatel.cz/tuzby/tuzby.php What could cause that the anchor does not work? If I choose some div that is

Clickable image with sprites

此生再无相见时 提交于 2020-01-25 00:32:32
问题 So I've got a series of clickable images in my page. I've tried to optimise this by generating a single image containing all the images I need and I intend to use sprites to select the one I want. I'm having trouble figuring out the best way to add anchor tags to the sprites though? So I'm after a clickable HTML element that supports sprites, preferably without using JavaScript. I can do it using JavaScript but I'd prefer to avoid it. OK, here's my code, what there is: .touringEscorted {