I have make this code:
var newURL = $(".list-portfolio a").attr("href"),
pathArray = newURL.split( '/' ),
secondLevelLocation = pathArray[0];
console.log(pathArray);
var pathArray = pathArray[3, 4];
The pathArray value is ["http:", "", "www.mikevierwind.nl", "portfolio", "ruimzicht.html"]
How can i get the last 2 items of this array. I want that the results is portfolio/ruimzicht.html.
var last2 = pathArray[3]+'/'+pathArray[4]
this could be...if you have fixed url.prop("pathname")
on the element.