href

How can I use Href in div

泪湿孤枕 提交于 2019-12-25 07:26:59
问题 Can I use href in div? Because I have errors in validator! How can use hred in div? My code: <div data-href="#member_log" login="0" class="num_id bookmark" id="girl" girlId=""></div> And error in validator: Attribute href not allowed on element div at this point. Thanks! 来源: https://stackoverflow.com/questions/37158674/how-can-i-use-href-in-div

Get url path and add class active on li

筅森魡賤 提交于 2019-12-25 05:12:00
问题 I try to grab the url path and then add active class on li example: www.mysite.com/?p=xxxx the x will change depending on which link the user clicks on I tried this: <ul class="top_menu"> <li class="tider"><a href="/?p=1884">Åbningstider</a></li> <li class="butikker"><a href="/?p=1885">Butikker</a></li> <li class="sker"><a href="/?p=1886">Det sker</a></li> <li class="nyhedsbrev"><a href="/?p=1887">Nyhedsbrev</a></li> <li class="vej"><a href="/?p=1888">Find vej</a></li> </ul> var text = window

How to activate jquery accordion from an image map href?

孤街醉人 提交于 2019-12-25 03:48:28
问题 I've searched all over and havent quite found the answer for my particular question. I have a simple jquery accordion and I want to be able to activate a particular section from an internal link. The link is coming from an image map so a viewer clicks on a region of the image and it activates that section of the accordion. Seems simple enough but I'm having a hell of a time with it. So for example I have so far: $(function() { $( "#myaccordion" ).accordion({ active: false, autoHeight: false,

How auto-generate a table of contents

南笙酒味 提交于 2019-12-25 02:42:09
问题 I'm new to JavaScript, and for school I have to automatically make every <\h1> on my page generate into an "ol" with in every "li" a link to the place on my page where that header is placed so in the end I have a table of contents with links on every "li". So I should be able to just write text and not worry about the table of contents. Is there a way to do this without using too complixated code? And preferably not very long so I can understand it. e.g. <h1 id="h1-01">Title 1<\h1> <h1 id="h1

disable prettyphoto on small screens (or any a href link)

荒凉一梦 提交于 2019-12-24 23:17:10
问题 I was looking for a way to disable prettyphoto lightbox on mibile devices or any other small screens and after spending hours by trying different script, I discovered a very simple way to do that with css media queries: html <div> <a class="lightbox" rel="prettyPhoto" href="img.jpg"> <img src="img.jpg"> </a> </div> css @media all and (max-width: 479px) { a.lightbox { pointer-events: none; } } But, I just like to know if there is a better (proper?) way? Is it better to use a JS functions ( ($

write html file that contains a link that open excel application in a specific sheet & row

痴心易碎 提交于 2019-12-24 15:48:59
问题 I'm writing a very simple HTML file that contains some tables. I'm trying to have a cell value, which is basically a link. by clicking on the link I'd like to open a file in an excel application in a specific sheet and row. Notes: windows environment HTML is opened by a standard browser the file exists locally (simple path: C:\test.xlsx) excel application path is unknown I'd like to keep the HTML file as simple as possible. good design is not a top priority. just need to make it happen. (low

href: Can I get Google search results to use/display the final redirect url?

五迷三道 提交于 2019-12-24 13:50:33
问题 My site has webpage urls that use the following format: www.mysite.com/id/pretty_title The front page links to these pages, but the href actually contains some parameters: www.mysite.com/id/?some_ugly_parameters_to_let_me_know_what_search_it_is_from This then redirects to www.mysite.com/id/pretty_title which shows the page. My issue is that Google's search results show the link to the page as the ugly one instead of the pretty redirected one. Besides looking ugly, it can cause errors because

Hyperlink within hyperlink

孤街醉人 提交于 2019-12-24 13:42:27
问题 Probably a silly questions, but I'd like to have a hyperlink withing another hyperlink, much like a <a href="#somewhere"> This is the hyperlink, <a href="somewhere_else.html">and this is the other one</a> </a> Aside from that it's not compliant and all, is there a way of doing this? *Edit: the outer hyperlink is used by a carousel, and won't take the browser somewhere. 回答1: Anchor tags, just like inline or block level elements, layer up on top of each other when nested such that attributes

Vanilla JavaScript code works in console but not from a (greasemonkey) script

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 13:32:31
问题 I use Windows10 home with latest Firefox and Greasemonkey. I created an account in livedns.co.il, which is an Israeli domain register. I then logged in. After logging in to the personal overview area , I tried to move myself to the domains management area , via this code: window.location.href = "https://domains.livedns.co.il/DomainsList.aspx"; It worked in console but not from a greasemonkey script. I thought I might need setTimeout() in the script: setTimeout(()=>{ window.location.href =

PHP Login Page Redirect

跟風遠走 提交于 2019-12-24 12:03:05
问题 this code is incomplete and I need it to redirect to a page called mainpage.php with hardcoded information for the username and password. Here's the code. <?php session_start(); $username="user"; $password="123"; if($_POST['username'] == $username && $_POST['password'] == $password) ?> <html> <head> </head> <body> <div style='text-align:center'> <h3>Welcome To Kontak</h3> </div> <hr /><br /> <form id='login' action="" method='post' accept-charset='UTF-8'> <fieldset style="width:550px">