Make a div into a link

I have a <div> block with some fancy visual content that I don’t want to change. I want to make it a clickable link. I’m looking for something like <a href=”https://stackoverflow.com/questions/796087/…”><div> … </div></a>, but that is valid XHTML 1.1. 28 s 28 Came here in the hope of finding a better solution that mine, but … Read more

Cross-reference (named anchor) in markdown

Is there markdown syntax for the equivalent of: Take me to <a href=”#pookie”>pookie</a> … <a name=”pookie”>this is pookie</a> 1Best Answer 11 Take me to [pookie](#pookie) should be the correct markdown syntax to jump to the anchor point named pookie. To insert an anchor point of that name use HTML: <a name=”pookie”></a> Markdown doesn’t seem to … Read more

Select which href ends with some string

Is it possible using jQuery to select all <a> links which href ends with “ABC”? For example, if I want to find this link <a href=”http://server/page.aspx?id=ABC”> 5 s 5 $(‘a[href$=”ABC”]’)… Selector documentation can be found at http://docs.jquery.com/Selectors For attributes: = is exactly equal != is not equal ^= is starts with $= is ends with … Read more

How can you check for a #hash in a URL using JavaScript?

I have some jQuery/JavaScript code that I want to run only when there is a hash (#) anchor link in a URL. How can you check for this character using JavaScript? I need a simple catch-all test that would detect URLs like these: example.com/page.html#anchor example.com/page.html#anotheranchor Basically something along the lines of: if (thereIsAHashInTheUrl) { do … Read more