anchor Questions

3

I'm using smoothscroll.js to navigate my site. It stops on the correct anchor in Firefox, however in Chrome it passes the point on the first click of the link, and pushes the content to the top, hi...
Erich asked 29/1, 2011 at 8:27

8

Solved

How do you link (with <a>) so that the browser goes to certain subheading on the target page as opposed to the top?
Standpoint asked 14/5, 2010 at 14:59

5

Solved

I have a function that replaces anchors' href attribute in a string using Php's DOMDocument. Here's a snippet: $doc = new DOMDocument('1.0', 'UTF-8'); $doc->loadHTML($text); $anchors = $doc-&gt...
Scorekeeper asked 27/4, 2009 at 5:38

4

Solved

Links within a page scroll your content to the top of the browser window. Is there any way to add a margin to that? I'll be using some javascript to guide the scrolling, but would like to have a vi...
Wicker asked 27/11, 2011 at 3:11

7

Solved

On using Google I found that they are using onclick events in anchor tags. In more option in google header part, it looks like normal a tag, but onclicking it doesn't get redirected but opened a m...
Oxalis asked 8/9, 2011 at 12:11

3

Sorry for the ugly layout example below... http://www.wthdesign.net/test/test2.html I managed to append my id name to the url: function generateUrl(el) { var currentId = $(el).attr('id'); docum...
Meridethmeridian asked 9/4, 2013 at 3:40

10

I am using the following code to scroll to anchor points with jQuery: $(document).ready(function() { function filterPath(string) { return string .replace(/^\//,'') .replace(/(index|default).[a...
Deerskin asked 6/7, 2012 at 15:21

4

Solved

I'm trying to transition the fill and path of an embedded SVG object, however this doesn't seem to work (Code Pen here): The SVG: <a class="simple-link svg-link" href=""> Some Text <sv...
Pantomimist asked 23/3, 2014 at 16:51

3

I have an a tag in my html file that is pointed to a .csv file. Every time I click on the link it downloads the same file in .xls extension. Why? I tried the following: <a href="./example.cs...
Indicatory asked 25/6, 2019 at 20:49

21

I am getting a warning on a React site I built ./src/components/layout/Navbar.js [1] Line 31: The href attribute requires a valid address. Provide a valid, navigable address as the href value jsx-...
Howlond asked 14/10, 2018 at 8:58

2

Solved

I ran anchor test --skip-deploy and all it should do is initialize my program, but all I get is this error, that I cannot resolve. I checked the tsconfig.json settings they should be fine. This is ...
Berlyn asked 15/2, 2022 at 0:13

38

Solved

If I have a non-scrolling header in an HTML page, fixed to the top, having a defined height: Is there a way to use the URL anchor (the #fragment part) to have the browser scroll to a certain point ...
Euraeurasia asked 3/11, 2010 at 10:31

30

Solved

I have a couple of hyperlinks on my page. A FAQ that users will read when they visit my help section. Using Anchor links, I can make the page scroll towards the anchor and guide the users there. ...
Pasture asked 10/10, 2011 at 19:19

3

I am creating a skip link, but the anchor tag is not taking focus in Safari (works in Chrome). I've enabled all accessibility settings as I've read in other posts: Safari --> Preferences --> Adva...
Boysenberry asked 12/10, 2018 at 16:12

6

Solved

Probably a stupid question, but I honestly can't wrap my head around what's going wrong here. http://harrisonfjord.com/thinkinc/ A site I'm building at the moment. I want to make an anchor link a...
Miscellanea asked 26/7, 2011 at 7:35

4

Bug | Help The jquery just doesn't fire up correctly when I try to change the class on nav-link. Maybe this has been blocked by other js? I am creating my index.php file which includes once header...
Aldwin asked 4/4, 2020 at 8:5

9

How do I create a link to a part of long webpage on another website that I don't control? I thought you could use a variant of the #partofpage at the end of my link. Any suggestions?
Goggleeyed asked 18/3, 2013 at 16:28

12

Solved

I'm working on an HTML project, and I can't find out how to open a link in a new tab without JavaScript. I already know that <a href="http://www.WEBSITE_NAME.com"></a> opens t...
Paulitapaulk asked 17/7, 2013 at 22:9

9

Solved

I have various links which all have unique id's that are "pseudo-anchors." I want them to affect the url hash value and the click magic is all handled by some mootools code. However, when I click o...
Read asked 2/8, 2009 at 2:40

8

Everything renders fine apart from link colors.. These are my links. <a href="http://www.facebook.com.." style="color:#000000;text-decoration:none;font-weight:bold">Facebook</a> <a...
Angulo asked 2/2, 2012 at 10:0

16

I am trying to attach click event to anchor tags (coming from ajax) and block the default redirection. How can I do it in angular ? <ul> <li><a href="/abc"><p>abc</p&g...
Deckle asked 4/1, 2017 at 7:58

9

Is there a way to bookmark or link to an HTML page (which I am not author of) without having an anchor in the HTML code? I want the page to get scrolled down to a particular section when accessed f...
Haloid asked 2/11, 2011 at 15:51

3

<a href="Resources/path.pdf">LINK </a> Here is my link I'm keeping my pdf file (path.pdf) in the resources folder and am trying to click this link to open the pdf. When I clic...
Kearns asked 27/4, 2016 at 20:10

4

Solved

I have the following material menu: <a mat-button [matMenuTriggerFor]="menu" disabled="true">Menu</a> <mat-menu #menu="matMenu"> <button mat-menu-item>Item 1</button&gt...
Acromion asked 19/2, 2019 at 12:17

9

Is it okay to use an anchor tag without including the href attribute, and instead using a JavaScript click event handler? So I would omit the href completely, not even have it empty (href="").
Mccarron asked 13/3, 2011 at 20:59

© 2022 - 2025 — McMap. All rights reserved.