Get current URL with JavaScript (and jQuery) - Beau teaches JavaScript

Subscribers:
10,700,000
Published on ● Video Link: https://www.youtube.com/watch?v=w5whn4iJCLc



Duration: 2:29
5,552 views
108


Get the current URL path with JavaScript and jQuery. Also, get the individual components of the path.

💻 Code: http://codepen.io/beaucarnes/pen/qRoYyJ?editors=0010

More information:
🔗 https://css-tricks.com/snippets/javascript/get-url-and-url-parts-in-javascript/
🔗 http://stackoverflow.com/questions/406192/get-current-url-in-javascript

🐦 Beau Carnes on Twitter: https://twitter.com/carnesbeau

⭐JavaScript Playlists⭐
▶JavaScript Basics: https://www.youtube.com/playlist?list=PLWKjhJtqVAbk2qRZtWSzCIN38JC_NdhW5
▶Data Structures and Algorithms: https://www.youtube.com/playlist?list=PLWKjhJtqVAbkso-IbgiiP48n-O-JQA9PJ
▶Design Patterns: https://www.youtube.com/playlist?list=PLWKjhJtqVAbnZtkAI3BqcYxKnfWn_C704
▶ES6: https://www.youtube.com/playlist?list=PLWKjhJtqVAbljtmmeS0c-CEl2LdE-eR_F
▶Clean Code: https://www.youtube.com/playlist?list=PLWKjhJtqVAbkK24EaPurzMq0-kw5U9pJh

-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.

Join our community at https://freecodecamp.com
Read great tech articles at https://medium.freecodecamp.com







Tags:
javascript
jquery
current url
url path
window
url
href
location