Simple use of location hash:
if(window.location.hash) {
// Fragment exists
} else {
// Fragment doesn't exist
}
More Related Contents:
- Adding The Anchor Text As The Title Dynamicaly
- Smooth scrolling when clicking an anchor link
- How to scroll an HTML page to a given anchor
- Modifying location.hash without page scrolling
- How to get the anchor from the URL using jQuery?
- Parsing URL hash/fragment identifier with JavaScript
- jQuery Text to Link Script? [duplicate]
- HTML anchor link – href and onclick both?
- ScrollTo function in AngularJS
- Auto-Scroll to next anchor at Mouse-wheel
- Calculate Javascript pixel widths for list of elements
- jQuery .live() vs .on() method for adding a click event after loading dynamic html
- why javascript this.style[property] return an empty string? [duplicate]
- make iframe height dynamic based on content inside- JQUERY/Javascript
- Show virtual keyboard on mobile phones in javascript
- Determine distance from the top of a div to top of window with javascript
- Ellipsis in the middle of a text (Mac style)
- fancybox bug with trigger click
- jQuery POST, Error 405 Method not allowed
- jQuery position DIV fixed at top on scroll
- jQuery key code for command key
- How can I set preview of video file, selecting from input type=’file’
- Bootstrap’s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3
- JavaScript Regex to match a URL in a field of text
- javascript/jquery – add debounce to a button
- Detect if dropdown navigation would go off screen and reposition it
- AngularJS: lazy loading controllers and content
- How to use jQuery UI with Angular 2
- Ordered JSONObject
- jQuery match part of class with hasClass