how to get current URL in jQuery/JavaScript?

To get the path, you can use:
var pathname = window.location.pathname; // Returns path only
var url      = window.location.href;     // Returns full URL

Comments

Popular posts from this blog

How to make Magento2 website faster

Famous and Successful Logo Redesigns

Elance HTML5 Test Answers