jquery get url
snippet in javascript

jquery get current url

user1532

var currentURL = $(location).attr('href'); //jQuery solution
var currentURL = window.location.href; // raw javascript

jquery get url

user4433

var currentURL = $(location).attr('href'); 
var currentURL = window.location.href;

jquery get

user6558

$.get( "ajax/test.html", function( data ) {
  $( ".result" ).html( data );
  alert( "Load was performed." );
});

jquery get URL slug

user4939

var pathname = window.location.pathname;