anchor

knockout - HTML href

泪湿孤枕 提交于 2019-12-21 06:56:30
问题 I have a foreach loop that goes through an array (filesObservableArray). The array has a key/value with the key: URLPath. When I bind the array within the HTML, I would like to set the 'href=' value with the URLPath. I know this part is a fail, but conceptually, can you see what I'm trying to do? href="< span data-bind='text: URLPath'>" Or maybe I can use a 'databind="click: someCode(url)"' and within the someCode function, open the link? The url maps to either a document file (e.g., .doc) or

<iframe src=“reallylongpage.html#bottom” /> doesn't work

二次信任 提交于 2019-12-21 05:45:14
问题 I have the following embedded iframe <iframe width="100%" height="400" src="reallylongpage.html" /> reallylongpage.html has 2 anchors #top and #bottom I want my iframe to load reallylongpage.html at the bottom of the page so I did <iframe width="100%" height="400" src="reallylongpage.html#bottom" /> But this has the undesirable effect of scrolling both the iframe AND the parent page. The parent page shouldn't scroll at all. This happens in Chrome and Firefox. here is an example with full code

How to hide an anchor tag by href #id using css

邮差的信 提交于 2019-12-21 04:18:33
问题 I have different anchor tags with href=#ids and I need to hide them using a general css rule for all of them, Content xxxxxxxxx <a href="#tab1">Table 1</a>.Content xxxxxxxxxxxx <a href="#tab2">Table 2</a> I was trying to use something like this: #wrap a='#tab1'{ display:none; } Any idea how to do it? 回答1: Try using attribute selectors: a[href='#tab1']{ display: none } Or even simply [href='#tab1']{ display: none } http://www.w3.org/TR/CSS2/selector.html 回答2: Why not just create a CSS class

Avoid the page scrolling/jumping when anchor is in the URL [duplicate]

别等时光非礼了梦想. 提交于 2019-12-21 03:32:48
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: jquery - disable anchor “jump” when loading a page I'm displaying a div depending on the hash value in a URL but i want to avoid the page jumping to the postion of that div with that particular ID. I only have the problem when the page is navigated direct with the hash in the URL so say for example if someone has book marked the page. So for example I have the url domain.com/page.html#myitem-1 ID=myitem-1 will

HTML Anchor, Disable Style

末鹿安然 提交于 2019-12-21 03:26:07
问题 I have some html anchor link code, and unlike the rest of document I want it to look like it is not a link. Is there a simple way to disable the style change caused by wrapping text in a anchor tag without having to brute force it to be the same (ie, if I change the body font style I don't have to also change some other :link stuff). 回答1: Setting color to black and text-decoration to explicitly none is a little more aggressive than worked for me. I was looking for the CSS of the anchors to be

Set visited link color to whatever the color of un-visited link is (P.S. not the usual question)

别来无恙 提交于 2019-12-20 10:15:40
问题 I need to set the a:visited CSS to whatever color the normal a is set to. What I want to be able to tell the browser is, for the visited links, use the same color as the unvisited links, whatever color it is . I need to do this without specifying a particular color. Like, if some weird browser comes along that uses "green" as the color for normal unvisited links, this CSS should instruct the browser to use that same green for visited links. Exactly what color is used by the browser should be

Getting a link to go to a specific section on another page

梦想与她 提交于 2019-12-20 09:58:04
问题 I have a link on one page that needs to go to a different page, but load to a specific section on that other page. I have done this before with bootstrap but they take all the 'coding' out of it, so I need to know how to do from scratch. Here is the markup I have based on this link (not the best resource, I know): http://www.w3schools.com/html/html_links.asp **Page One** <a href="/academics/page.html#timeline> Click here </a> **Page I am linking to** <div id="timeline" name="timeline"> ... <

header Location redirect with anchor tag and IE7

别等时光非礼了梦想. 提交于 2019-12-20 06:37:41
问题 Hey there! Here is my issue, it could just be a browser issue but any help/ideas would be awesome! Pretty much I have the following redirect: header("Location: page.php#images"); In most modern browsers it will redirect to page.php#images without any problems but in IE it seems to strip the #images. Has anyone come across this? So far my only option (which I think is a terrible option) is to redirect through JavaScript. thanks! UPDATE I sent up a simple sandbox and it seems to work fine with

How to hide anchor tag from URL

旧街凉风 提交于 2019-12-20 06:09:51
问题 How can I hide the hash value from the following link href in the address bar? <a href="index.php#dev_name"> So it'll redirect me to a the index.php#dev_name , but I want the address bar to only show index.php 回答1: You can use a Javascript onclick event. The browser will still show index.php , but the onclick event will trigger first, and redirect the browser to the right page. <a href="index.php" onclick="location.redirect('index.php#dev');"> 来源: https://stackoverflow.com/questions/10045303

Why alert AnchorElement (<a>) alerts the href attribute?

痴心易碎 提交于 2019-12-20 03:21:37
问题 <a href="url">A link</a> $.each($('a'), function(index,value){ alert (value) }); It will alert : url . Why this happens? 回答1: It's because the toString() of the anchor gives the URL. Live DEMO alert calls toString() implicity on objects. so when you alert an array like: [1,2,3,4,5,6] Alerting it will give you: "1,2,3,4,5,6" Because the toString() of array is the elements separated by a comma. If you encounter this problem while debugging, you should use console.log() instead of alert() 回答2: